提交 6b1259d1 编写于 作者: J Johannes Berg 提交者: Luca Coelho

iwlwifi: mvm: remove session protection after auth/assoc

When auth/assoc completes, we should remove session protection,
except when association is successful, where we need it until a
beacon is received from the AP.

In particular, in the case of assoc comeback, currently the session
protection event just times out, leading to confusing messages:

  wlan0: 42:00:00:00:00:00 rejected association temporarily; comeback duration 1000 TU (1024 ms)
  iwlwifi 0000:00:00.0: Not associated and the session protection is over already...
  wlan0: Connection to AP 42:00:00:00:00:00 lost
  wlan0: associate with 42:00:00:00:00:00 (try 2/3)

mac80211 never does anything on the "Connection ... lost" as it's
not even connected.

Removing the session protection when it's no longer needed removes
those confusing messages and lets the device do other things in the
allocated time.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211017162352.95e4bebb069b.I635280e5d26c70414ac6eb5d62b46fe4bd942818@changeidSigned-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 425d66d8
...@@ -3347,6 +3347,21 @@ static void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw, ...@@ -3347,6 +3347,21 @@ static void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
} }
static void iwl_mvm_mac_mgd_complete_tx(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_prep_tx_info *info)
{
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
/* for successful cases (auth/assoc), don't cancel session protection */
if (info->success)
return;
mutex_lock(&mvm->mutex);
iwl_mvm_stop_session_protection(mvm, vif);
mutex_unlock(&mvm->mutex);
}
static int iwl_mvm_mac_sched_scan_start(struct ieee80211_hw *hw, static int iwl_mvm_mac_sched_scan_start(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct cfg80211_sched_scan_request *req, struct cfg80211_sched_scan_request *req,
...@@ -5347,6 +5362,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = { ...@@ -5347,6 +5362,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
.sta_rc_update = iwl_mvm_sta_rc_update, .sta_rc_update = iwl_mvm_sta_rc_update,
.conf_tx = iwl_mvm_mac_conf_tx, .conf_tx = iwl_mvm_mac_conf_tx,
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx, .mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
.mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx,
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover, .mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
.flush = iwl_mvm_mac_flush, .flush = iwl_mvm_mac_flush,
.sched_scan_start = iwl_mvm_mac_sched_scan_start, .sched_scan_start = iwl_mvm_mac_sched_scan_start,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册