From patchwork Wed Sep 3 19:56:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 4836761 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FB8FC0338 for ; Wed, 3 Sep 2014 19:57:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44F6D201CD for ; Wed, 3 Sep 2014 19:57:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D16F20131 for ; Wed, 3 Sep 2014 19:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755992AbaICT5P (ORCPT ); Wed, 3 Sep 2014 15:57:15 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:44424 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756135AbaICT5N (ORCPT ); Wed, 3 Sep 2014 15:57:13 -0400 Received: by mail-wg0-f44.google.com with SMTP id m15so9030484wgh.15 for ; Wed, 03 Sep 2014 12:57:12 -0700 (PDT) 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=XVVt0dqGU7vz+pR2pAwi8rebLiaMiLkSntWgl2HmDMc=; b=ehLkQcm63mNxgdF1tEendvPYFpm8VeGSKJXEWpDGXgjt7o5tPL8NGpm7qqJ/7GzxXp fZ99P9Njjktsu7ng/cy0RX5Y/MPqP7dXymwnU5MfJrQhVpWw119Z0QB3NoyGxXhfLGJ+ sxKTTReLsQ9d0iSpFdX7A9zWguU3hDCm8DOT/o+04aTFb0ACpcF7J+uwvXV3PCXW3du/ yXKFCUNU+VNK4JLTpXy/QtS4kWk6IoEzxo+ppSyIK2nuMhXh4XBMGj4iD0e+6PsrOb2S 1+PUQTTsujTe2sz2iXYsMFYUqK+CiqVT04ZgUMIrpXCraP/Zr5yPaX6Q56+7grv/QhX4 IaiQ== X-Received: by 10.194.104.72 with SMTP id gc8mr6181811wjb.105.1409774232604; Wed, 03 Sep 2014 12:57:12 -0700 (PDT) Received: from localhost.localdomain (46-116-189-180.bb.netvision.net.il. [46.116.189.180]) by mx.google.com with ESMTPSA id qd1sm6228561wic.8.2014.09.03.12.57.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Sep 2014 12:57:12 -0700 (PDT) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Luciano Coelho , Emmanuel Grumbach Subject: [PATCH 29/36] iwlwifi: mvm: set the TX disable bit when doing a chanctx switch Date: Wed, 3 Sep 2014 22:56:17 +0300 Message-Id: <1409774184-24665-29-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <540771E5.6080908@gmail.com> References: <540771E5.6080908@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Luciano Coelho During a channel switch we should tell the firmware to disable TX temporarily and re-enable it after the switch is done. Signed-off-by: Luciano Coelho Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index cbe9ff0..3bbeedf 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -2748,6 +2748,19 @@ static int __iwl_mvm_assign_vif_chanctx(struct iwl_mvm *mvm, iwl_mvm_mac_ctxt_changed(mvm, vif, false); } + if (vif->csa_active && vif->type == NL80211_IFTYPE_STATION) { + struct iwl_mvm_sta *mvmsta; + + mvmsta = iwl_mvm_sta_from_staid_protected(mvm, + mvmvif->ap_sta_id); + + if (WARN_ON(!mvmsta)) + goto out; + + /* TODO: only re-enable after the first beacon */ + iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false); + } + goto out; out_remove_binding: @@ -2779,6 +2792,7 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct ieee80211_vif *disabled_vif = NULL; + struct iwl_mvm_sta *mvmsta; lockdep_assert_held(&mvm->mutex); @@ -2810,6 +2824,12 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm, disabled_vif = vif; + mvmsta = iwl_mvm_sta_from_staid_protected(mvm, + mvmvif->ap_sta_id); + + if (!WARN_ON(!mvmsta)) + iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); + iwl_mvm_mac_ctxt_changed(mvm, vif, true); break; default: