diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-04-14 12:12:04 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-04-14 13:15:27 +0200 |
commit | d3f9cd61b11a3ba9be1ddb27a6a4a2aceb8afe5b (patch) | |
tree | 603ce6a35fca31d5f494b15128fcf28fb0651cba /drivers/net/wireless/intel/iwlwifi/mvm | |
parent | wifi: iwlwifi: mvm: set STA mask for keys in MLO (diff) | |
download | linux-d3f9cd61b11a3ba9be1ddb27a6a4a2aceb8afe5b.tar.xz linux-d3f9cd61b11a3ba9be1ddb27a6a4a2aceb8afe5b.zip |
wifi: iwlwifi: mvm: validate station properly in flush
If we have MLO, then the deflink.ap_sta_id cannot be used.
However, we can use the new mvmvif->ap_sta pointer for the
validation instead.
Also don't do it multiple times for different FW instances
of the same AP STA (TDLS STAs are only on a single link).
Note that this isn't really working right yet since the
underlying flush code hasn't been updated yet to know of
multiple link STAs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230414130637.7d747df44d65.Ie5392859fab4cfb73c20b49bfee2caadef5fd8ec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 540d6e3e30d4..718b5ba6ec92 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -5605,6 +5605,7 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif; struct iwl_mvm_sta *mvmsta; struct ieee80211_sta *sta; + bool ap_sta_done = false; int i; u32 msk = 0; @@ -5633,8 +5634,14 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (mvmsta->vif != vif) continue; + if (sta == mvmvif->ap_sta) { + if (ap_sta_done) + continue; + ap_sta_done = true; + } + /* make sure only TDLS peers or the AP are flushed */ - WARN_ON_ONCE(i != mvmvif->deflink.ap_sta_id && !sta->tdls); + WARN_ON_ONCE(sta != mvmvif->ap_sta && !sta->tdls); if (drop) { if (iwl_mvm_flush_sta(mvm, mvmsta, false)) |