aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-11-10 04:10:11 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-24 01:30:29 -0500
commit7ef0aab66b317ff4d818966b2104c900c7126ec8 (patch)
tree14e643acbf19c1a9146c56e9a4f76417374ccb17 /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parent6fd1fb63abeb78fd7fe30f08f478732ad601702c (diff)
iwlwifi: mvm: Handle failed beacon transmissions during CSA
The spec requires to decrement the CSA counters based on TBTT, regardless if the beacon was actually transmitted. Previously, the fw would send beacon notifications only for successfully transmitted beacons. This behavior resulted in inaccurate CSA countdown. In order to address this issue, the fw was changed to send beacon notifications also for not transmitted beacons. Such notifications have TX_STATUS_INTERNAL_ABORT (0x92). Don't start the CSA countdown before first successfully transmitted beacon, in order to guarantee that the CSA is announced for a required period. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 1d556173fcb6..6098eafcf13a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -2909,6 +2909,8 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm,
2909 if (!vif->csa_active || !mvmvif->ap_ibss_active) 2909 if (!vif->csa_active || !mvmvif->ap_ibss_active)
2910 goto out; 2910 goto out;
2911 2911
2912 mvmvif->csa_countdown = false;
2913
2912 /* Set CS bit on all the stations */ 2914 /* Set CS bit on all the stations */
2913 iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, true); 2915 iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, true);
2914 2916
@@ -3164,6 +3166,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
3164{ 3166{
3165 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 3167 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
3166 struct ieee80211_vif *csa_vif; 3168 struct ieee80211_vif *csa_vif;
3169 struct iwl_mvm_vif *mvmvif;
3167 int ret; 3170 int ret;
3168 3171
3169 mutex_lock(&mvm->mutex); 3172 mutex_lock(&mvm->mutex);
@@ -3183,6 +3186,14 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
3183 } 3186 }
3184 3187
3185 rcu_assign_pointer(mvm->csa_vif, vif); 3188 rcu_assign_pointer(mvm->csa_vif, vif);
3189
3190 mvmvif = iwl_mvm_vif_from_mac80211(vif);
3191 if (WARN_ONCE(mvmvif->csa_countdown,
3192 "Previous CSA countdown didn't complete")) {
3193 ret = -EBUSY;
3194 goto out_unlock;
3195 }
3196
3186 break; 3197 break;
3187 default: 3198 default:
3188 break; 3199 break;