diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-05-27 18:06:08 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-05-29 10:33:50 +0200 |
commit | d9b7531fe98a0c2a0387270557cf0a514c28dd28 (patch) | |
tree | 7a36b16229451c6cdfe98cf2cdfe3277a874ceba /drivers/net/wireless/intel/iwlwifi/mvm/link.c | |
parent | wifi: iwlwifi: mvm: add support for version 10 of the responder config command (diff) | |
download | linux-d9b7531fe98a0c2a0387270557cf0a514c28dd28.tar.xz linux-d9b7531fe98a0c2a0387270557cf0a514c28dd28.zip |
wifi: iwlwifi: mvm: use only beacon BSS load for active links
For active links, don't take information that may have been
received in probe responses, as those are not protected. For
inactive links, there may not be a choice.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240527190228.6947dc462fa9.I2076961211d6785c8a15b4308e0e87a413148222@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/link.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/link.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 0745229c8c37..02a475a1f1b8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -492,17 +492,27 @@ iwl_mvm_get_puncturing_factor(const struct ieee80211_bss_conf *link_conf) static unsigned int iwl_mvm_get_chan_load(struct ieee80211_bss_conf *link_conf) { + struct ieee80211_vif *vif = link_conf->vif; struct iwl_mvm_vif_link_info *mvm_link = iwl_mvm_vif_from_mac80211(link_conf->vif)->link[link_conf->link_id]; const struct element *bss_load_elem; const struct ieee80211_bss_load_elem *bss_load; enum nl80211_band band = link_conf->chanreq.oper.chan->band; + const struct cfg80211_bss_ies *ies; unsigned int chan_load; u32 chan_load_by_us; rcu_read_lock(); - bss_load_elem = ieee80211_bss_get_elem(link_conf->bss, - WLAN_EID_QBSS_LOAD); + if (ieee80211_vif_link_active(vif, link_conf->link_id)) + ies = rcu_dereference(link_conf->bss->beacon_ies); + else + ies = rcu_dereference(link_conf->bss->ies); + + if (ies) + bss_load_elem = cfg80211_find_elem(WLAN_EID_QBSS_LOAD, + ies->data, ies->len); + else + bss_load_elem = NULL; /* If there isn't BSS Load element, take the defaults */ if (!bss_load_elem || |