aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2021-03-30 16:24:49 +0300
committerLuca Coelho <luciano.coelho@intel.com>2021-04-14 12:05:26 +0300
commit7686fd52b8757aaedb4cf3b38bf02d1911674545 (patch)
treedf3ff4f49a55ae2e7716460bfc15820c04160b3e /drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
parentionic: return -EFAULT if copy_to_user() fails (diff)
downloadlinux-dev-7686fd52b8757aaedb4cf3b38bf02d1911674545.tar.xz
linux-dev-7686fd52b8757aaedb4cf3b38bf02d1911674545.zip
iwlwifi: mvm: enable TX on new CSA channel before disconnecting
When moving to the new channel, we block TX until we hear the first beacon. if it is not heard, we proceed to disconnect. Since TX is blocked (without mac80211 being aware of it) the frame is stuck, resulting with queue hang. Instead, reenable TX before reporting on the connection loss. As we are on the new channel, there is no problem with that, even if the original CSA had quiet mode. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210330162204.eb4f2ff1b863.Ib16238106b33d58b2b7688dc6297018b915ecef4@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/time-event.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/time-event.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 0b012f8c9eb2..1418a6438635 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -151,6 +151,16 @@ static bool iwl_mvm_te_check_disconnect(struct iwl_mvm *mvm,
if (errmsg)
IWL_ERR(mvm, "%s\n", errmsg);
+ if (mvmvif->csa_bcn_pending) {
+ struct iwl_mvm_sta *mvmsta;
+
+ rcu_read_lock();
+ mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id);
+ if (!WARN_ON(!mvmsta))
+ iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
+ rcu_read_unlock();
+ }
+
iwl_mvm_connection_loss(mvm, vif, errmsg);
return true;
}