Commit f81747a9 authored by Johannes Berg's avatar Johannes Berg

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: default avatarMiriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240506215543.b2c5a72dac1b.I69f65cb2e75d4a49a174b1aede68bf8ff0a3cab3@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 344d18ce
...@@ -2517,8 +2517,13 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link, ...@@ -2517,8 +2517,13 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link,
goto drop_connection; goto drop_connection;
} }
link->csa.chanreq = csa_ie.chanreq;
if (link->u.mgd.conn.mode < IEEE80211_CONN_MODE_EHT ||
sdata->vif.driver_flags & IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW)
link->csa.chanreq.ap.chan = NULL;
if (chanctx) { if (chanctx) {
res = ieee80211_link_reserve_chanctx(link, &csa_ie.chanreq, res = ieee80211_link_reserve_chanctx(link, &link->csa.chanreq,
chanctx->mode, false); chanctx->mode, false);
if (res) { if (res) {
link_info(link, link_info(link,
...@@ -2529,7 +2534,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link, ...@@ -2529,7 +2534,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link,
} }
link->conf->csa_active = true; link->conf->csa_active = true;
link->csa.chanreq = csa_ie.chanreq;
link->u.mgd.csa.ignored_same_chan = false; link->u.mgd.csa.ignored_same_chan = false;
link->u.mgd.beacon_crc_valid = false; link->u.mgd.beacon_crc_valid = false;
link->u.mgd.csa.blocked_tx = csa_ie.mode; link->u.mgd.csa.blocked_tx = csa_ie.mode;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Copyright 2007, Michael Wu <flamingice@sourmilk.net> * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
* Copyright 2007-2008, Intel Corporation * Copyright 2007-2008, Intel Corporation
* Copyright 2008, Johannes Berg <johannes@sipsolutions.net> * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
* Copyright (C) 2018, 2020, 2022-2023 Intel Corporation * Copyright (C) 2018, 2020, 2022-2024 Intel Corporation
*/ */
#include <linux/ieee80211.h> #include <linux/ieee80211.h>
...@@ -366,6 +366,9 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, ...@@ -366,6 +366,9 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
validate_chandef_by_ht_vht_oper(sdata, conn, vht_cap_info, validate_chandef_by_ht_vht_oper(sdata, conn, vht_cap_info,
&new_chandef); &new_chandef);
/* capture the AP chandef before (potential) downgrading */
csa_ie->chanreq.ap = new_chandef;
/* if data is there validate the bandwidth & use it */ /* if data is there validate the bandwidth & use it */
if (new_chandef.chan) { if (new_chandef.chan) {
if (conn->bw_limit < IEEE80211_CONN_BW_LIMIT_320 && if (conn->bw_limit < IEEE80211_CONN_BW_LIMIT_320 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment