Skip to content

Commit f81747a

Browse files
committed
wifi: mac80211: handle wider bandwidth OFDMA during CSA
During channel switch, track the AP configuration in the chanreq, so that wider bandwidth OFDMA is taken into account correctly, since multiple channel contexts may be needed due to sharing not being possible due to wider bandwidth OFDMA. Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://msgid.link/20240506215543.b2c5a72dac1b.I69f65cb2e75d4a49a174b1aede68bf8ff0a3cab3@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 344d18c commit f81747a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

net/mac80211/mlme.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,8 +2517,13 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link,
25172517
goto drop_connection;
25182518
}
25192519

2520+
link->csa.chanreq = csa_ie.chanreq;
2521+
if (link->u.mgd.conn.mode < IEEE80211_CONN_MODE_EHT ||
2522+
sdata->vif.driver_flags & IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW)
2523+
link->csa.chanreq.ap.chan = NULL;
2524+
25202525
if (chanctx) {
2521-
res = ieee80211_link_reserve_chanctx(link, &csa_ie.chanreq,
2526+
res = ieee80211_link_reserve_chanctx(link, &link->csa.chanreq,
25222527
chanctx->mode, false);
25232528
if (res) {
25242529
link_info(link,
@@ -2529,7 +2534,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link,
25292534
}
25302535

25312536
link->conf->csa_active = true;
2532-
link->csa.chanreq = csa_ie.chanreq;
25332537
link->u.mgd.csa.ignored_same_chan = false;
25342538
link->u.mgd.beacon_crc_valid = false;
25352539
link->u.mgd.csa.blocked_tx = csa_ie.mode;

net/mac80211/spectmgmt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright 2007, Michael Wu <[email protected]>
1010
* Copyright 2007-2008, Intel Corporation
1111
* Copyright 2008, Johannes Berg <[email protected]>
12-
* Copyright (C) 2018, 2020, 2022-2023 Intel Corporation
12+
* Copyright (C) 2018, 2020, 2022-2024 Intel Corporation
1313
*/
1414

1515
#include <linux/ieee80211.h>
@@ -366,6 +366,9 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
366366
validate_chandef_by_ht_vht_oper(sdata, conn, vht_cap_info,
367367
&new_chandef);
368368

369+
/* capture the AP chandef before (potential) downgrading */
370+
csa_ie->chanreq.ap = new_chandef;
371+
369372
/* if data is there validate the bandwidth & use it */
370373
if (new_chandef.chan) {
371374
if (conn->bw_limit < IEEE80211_CONN_BW_LIMIT_320 &&

0 commit comments

Comments
 (0)