diff options
author | Aditya Kumar Singh <quic_adisi@quicinc.com> | 2024-09-06 12:14:24 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-09-06 13:01:05 +0200 |
commit | d74380ee99b59a2e46612c12c85e701ab213f4ea (patch) | |
tree | 81473eeaa2042c3ea54dedf418b2e1d330031621 /net/mac80211/util.c | |
parent | 81f67d60ebf290da068af96ad0c4a4e4faebdf1d (diff) | |
download | linux-d74380ee99b59a2e46612c12c85e701ab213f4ea.tar.gz linux-d74380ee99b59a2e46612c12c85e701ab213f4ea.tar.bz2 linux-d74380ee99b59a2e46612c12c85e701ab213f4ea.zip |
wifi: mac80211: handle DFS per link
In order to support DFS with MLO, handle the link ID now passed from
cfg80211, adjust the code to do everything per link and call the
notifications to cfg80211 correctly.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://patch.msgid.link/20240906064426.2101315-7-quic_adisi@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c4fd60fbcfd4..2e37d2639074 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -3471,20 +3471,30 @@ void ieee80211_dfs_cac_cancel(struct ieee80211_local *local) { struct ieee80211_sub_if_data *sdata; struct cfg80211_chan_def chandef; + struct ieee80211_link_data *link; + unsigned int link_id; lockdep_assert_wiphy(local->hw.wiphy); list_for_each_entry(sdata, &local->interfaces, list) { - wiphy_delayed_work_cancel(local->hw.wiphy, - &sdata->deflink.dfs_cac_timer_work); - - if (sdata->wdev.links[0].cac_started) { - chandef = sdata->vif.bss_conf.chanreq.oper; - ieee80211_link_release_channel(&sdata->deflink); - cfg80211_cac_event(sdata->dev, - &chandef, + for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; + link_id++) { + link = sdata_dereference(sdata->link[link_id], + sdata); + if (!link) + continue; + + wiphy_delayed_work_cancel(local->hw.wiphy, + &link->dfs_cac_timer_work); + + if (!sdata->wdev.links[link_id].cac_started) + continue; + + chandef = link->conf->chanreq.oper; + ieee80211_link_release_channel(link); + cfg80211_cac_event(sdata->dev, &chandef, NL80211_RADAR_CAC_ABORTED, - GFP_KERNEL, 0); + GFP_KERNEL, link_id); } } } |