From patchwork Mon Nov 24 14:34:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5367031 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6ACF59F39D for ; Mon, 24 Nov 2014 14:36:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7554F2041F for ; Mon, 24 Nov 2014 14:36:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F8692041D for ; Mon, 24 Nov 2014 14:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932276AbaKXOgP (ORCPT ); Mon, 24 Nov 2014 09:36:15 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:45957 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932271AbaKXOgM (ORCPT ); Mon, 24 Nov 2014 09:36:12 -0500 Received: by mail-wg0-f53.google.com with SMTP id l18so12522884wgh.12 for ; Mon, 24 Nov 2014 06:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u20X54th84a0KWwlVXzj9YAtUMF/6x0m+Fznd9DDIgo=; b=wTmwPiIHMigJVeVj4cErnas0W5xAnOru3Yv8NFoLtssaEVKKIlFCzTUxsZjSkwV9zA Vd+cQYYEwl4BhbMeMAOp9dVEzGSeokAkq8B7ZAGSQpPDFxeZ714Yk4Yatsvta0Mzv+34 c7PlA2Exdfy+534i2wuYG6T3jIiEm9AfSGXFltAKpuoOnNgGO0PVTqcPfLPOzhgbgTpn Z87gY1hrix8NBeHCPO3cFD6yTKJyhl/vVdmTyi3MUTp1neRihi9JyPzP5YsUuLOtj1b4 ctoWxHOFKFguKOERxIeZlBkUE3QXPkDDbiX8oMcAdXN0cFNL5lzgaWXSYkMnhWvacvaC cW6w== X-Received: by 10.194.79.199 with SMTP id l7mr34885759wjx.136.1416839771337; Mon, 24 Nov 2014 06:36:11 -0800 (PST) Received: from localhost.localdomain (46-116-150-134.bb.netvision.net.il. [46.116.150.134]) by mx.google.com with ESMTPSA id n3sm21274744wjz.21.2014.11.24.06.36.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 06:36:10 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Arik Nemtsov , Arik Nemtsov , Emmanuel Grumbach Subject: [PATCH 45/75] iwlwifi: mvm: disconnect TDLS peers on reconfig Date: Mon, 24 Nov 2014 16:34:21 +0200 Message-Id: <1416839691-28533-45-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arik Nemtsov When TDLS peers are present the FW will send packets on a dedicated TID vs. the peer when performing TDLS channel-switches. The driver configures the TID on connection to the peer and the FW is responsible for maintaining the state of QoS seqno and PN/IV for encryption. If the FW asserts, the driver cannot correctly reconfigure the starting seqno/PN to the reloaded FW, thus forcing us to reconnect the peer. Signed-off-by: Arik Nemtsov Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 801abcf..3883a86 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -948,6 +948,12 @@ static void iwl_mvm_restart_complete(struct iwl_mvm *mvm) /* allow transport/FW low power modes */ iwl_mvm_unref(mvm, IWL_MVM_REF_UCODE_DOWN); + /* + * If we have TDLS peers, remove them. We don't know the last seqno/PN + * of packets the FW sent out, so we must reconnect. + */ + iwl_mvm_teardown_tdls_peers(mvm); + mutex_unlock(&mvm->mutex); }