summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-11-10 11:10:11 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-24 08:30:29 +0200
commit7ef0aab66b317ff4d818966b2104c900c7126ec8 (patch)
tree14e643acbf19c1a9146c56e9a4f76417374ccb17 /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parent6fd1fb63abeb78fd7fe30f08f478732ad601702c (diff)
downloadlinux-rt-7ef0aab66b317ff4d818966b2104c900c7126ec8.tar.gz
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,
if (!vif->csa_active || !mvmvif->ap_ibss_active)
goto out;
+ mvmvif->csa_countdown = false;
+
/* Set CS bit on all the stations */
iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, true);
@@ -3164,6 +3166,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
{
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
struct ieee80211_vif *csa_vif;
+ struct iwl_mvm_vif *mvmvif;
int ret;
mutex_lock(&mvm->mutex);
@@ -3183,6 +3186,14 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
}
rcu_assign_pointer(mvm->csa_vif, vif);
+
+ mvmvif = iwl_mvm_vif_from_mac80211(vif);
+ if (WARN_ONCE(mvmvif->csa_countdown,
+ "Previous CSA countdown didn't complete")) {
+ ret = -EBUSY;
+ goto out_unlock;
+ }
+
break;
default:
break;