aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-05-08 09:03:39 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-03 15:49:08 -0400
commit0ce04ce797f87cdb6e10deef6a6081366be8bcc0 (patch)
tree78c14c83da7c0b7afadafcbf3a42bba210c085cd
parent8b4139dc9f2171f313fc703c08269f6f8a6f6fc4 (diff)
iwlwifi: mvm: set the TX disable bit when doing a chanctx switch
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 <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index cbe9ff09995a..3bbeedfb789c 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,
2748 iwl_mvm_mac_ctxt_changed(mvm, vif, false); 2748 iwl_mvm_mac_ctxt_changed(mvm, vif, false);
2749 } 2749 }
2750 2750
2751 if (vif->csa_active && vif->type == NL80211_IFTYPE_STATION) {
2752 struct iwl_mvm_sta *mvmsta;
2753
2754 mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
2755 mvmvif->ap_sta_id);
2756
2757 if (WARN_ON(!mvmsta))
2758 goto out;
2759
2760 /* TODO: only re-enable after the first beacon */
2761 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
2762 }
2763
2751 goto out; 2764 goto out;
2752 2765
2753out_remove_binding: 2766out_remove_binding:
@@ -2779,6 +2792,7 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm,
2779{ 2792{
2780 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 2793 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
2781 struct ieee80211_vif *disabled_vif = NULL; 2794 struct ieee80211_vif *disabled_vif = NULL;
2795 struct iwl_mvm_sta *mvmsta;
2782 2796
2783 lockdep_assert_held(&mvm->mutex); 2797 lockdep_assert_held(&mvm->mutex);
2784 2798
@@ -2810,6 +2824,12 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm,
2810 2824
2811 disabled_vif = vif; 2825 disabled_vif = vif;
2812 2826
2827 mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
2828 mvmvif->ap_sta_id);
2829
2830 if (!WARN_ON(!mvmsta))
2831 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true);
2832
2813 iwl_mvm_mac_ctxt_changed(mvm, vif, true); 2833 iwl_mvm_mac_ctxt_changed(mvm, vif, true);
2814 break; 2834 break;
2815 default: 2835 default: