Skip to content

Commit 6f9e701

Browse files
committed
wifi: mac80211: fix deactivated link CSA
If the link is deactivated and the CSA completes, then that needs to update the link station's bandwidth (only the AP STA can exist at this point, no TDLS on inactive links) and set the CSA to no longer be active. Fix this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250609213231.07f120cf687d.I5a868c501ee73fcc2355d61c2ee06e5f444b350f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent bc7566f commit 6f9e701

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

net/mac80211/mlme.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,9 +2381,26 @@ static void ieee80211_csa_switch_work(struct wiphy *wiphy,
23812381
* update cfg80211 directly.
23822382
*/
23832383
if (!ieee80211_vif_link_active(&sdata->vif, link->link_id)) {
2384+
struct link_sta_info *link_sta;
2385+
struct sta_info *ap_sta;
2386+
23842387
link->conf->chanreq = link->csa.chanreq;
23852388
cfg80211_ch_switch_notify(sdata->dev, &link->csa.chanreq.oper,
23862389
link->link_id);
2390+
link->conf->csa_active = false;
2391+
2392+
ap_sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
2393+
if (WARN_ON(!ap_sta))
2394+
return;
2395+
2396+
link_sta = wiphy_dereference(wiphy,
2397+
ap_sta->link[link->link_id]);
2398+
if (WARN_ON(!link_sta))
2399+
return;
2400+
2401+
link_sta->pub->bandwidth =
2402+
_ieee80211_sta_cur_vht_bw(link_sta,
2403+
&link->csa.chanreq.oper);
23872404
return;
23882405
}
23892406

0 commit comments

Comments
 (0)