diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2023-03-29 10:05:15 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-30 13:08:38 +0300 |
commit | 5ae9daf1e31cc9a4c0898ea660ee96016f3c1729 (patch) | |
tree | 922d57a8dadb6c274e5811abe1ec77fae1ec36fb /drivers | |
parent | ba9eef6ba636e72c00b565610d29d10984711d68 (diff) | |
download | linux-5ae9daf1e31cc9a4c0898ea660ee96016f3c1729.tar.xz |
wifi: iwlwifi: mvm: adjust radar detection to MLO
Make the decision about radar detection status depending
on each active MLO link.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230329100039.a61b1d3f681a.I27bb8726d8806ad725c22bc7256856b1b6636745@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/power.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index 45a652cce491..2033d89dc9e5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c @@ -279,18 +279,24 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, static bool iwl_mvm_power_is_radar(struct ieee80211_vif *vif) { struct ieee80211_chanctx_conf *chanctx_conf; - struct ieee80211_channel *chan; + struct ieee80211_bss_conf *link_conf; bool radar_detect = false; + unsigned int link_id; rcu_read_lock(); - chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf); - WARN_ON(!chanctx_conf); - if (chanctx_conf) { - chan = chanctx_conf->def.chan; - radar_detect = chan->flags & IEEE80211_CHAN_RADAR; + for_each_vif_active_link(vif, link_conf, link_id) { + chanctx_conf = rcu_dereference(link_conf->chanctx_conf); + if (WARN_ON(!chanctx_conf)) + continue; + + radar_detect = !!(chanctx_conf->def.chan->flags & + IEEE80211_CHAN_RADAR); + if (radar_detect) + goto out; } - rcu_read_unlock(); +out: + rcu_read_unlock(); return radar_detect; } |