diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-02-14 15:03:49 +0100 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 12:56:38 +0000 |
commit | b463faa5351913dae908c2d31327fc8cdbff998b (patch) | |
tree | 4be0050476cc8902b0a4285a49869de634612f8d | |
parent | dd3889e2a28fc66495f39cd6a556764089305d63 (diff) | |
download | backport-iwlwifi-b463faa5351913dae908c2d31327fc8cdbff998b.tar.gz |
wifi: mac80211: mlme: unify CSA handling
Unify all the CSA handling, including handling of a beacon
after the CSA, into ieee80211_sta_process_chanswitch().
The CRC of the beacon will change due to changes in the
CSA/ECSA elements, so there's really no need to have the
'beacon after CSA' handling before the CRC processing or
to change the beacon_crc_valid value here.
type=cleanup
ticket=none
Change-Id: I9dc68ff1e84d51349822bc7d3b33b578fcf8e360
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/94566
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
x-iwlwifi-stack-dev: cbd1ef456249be1c2f73ba47e1a99158502b129d
-rw-r--r-- | net/mac80211/mlme.c | 38 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 23 insertions, 17 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2550b84bef..e1fac3d491 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1933,11 +1933,6 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_link_data *link) link->conf->csa_active = false; link->u.mgd.csa_waiting_bcn = false; - /* - * If the CSA IE is still present on the beacon after the switch, - * we need to consider it as a new CSA (possibly to self). - */ - link->u.mgd.beacon_crc_valid = false; ret = drv_post_channel_switch(link); if (ret) { @@ -2052,18 +2047,32 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link, if (res < 0) goto drop_connection; - if (beacon && link->conf->csa_active && - !link->u.mgd.csa_waiting_bcn) { - if (res) + if (link->conf->csa_active) { + /* already processing - disregard action frames */ + if (!beacon) + return; + + if (link->u.mgd.csa_waiting_bcn) { + ieee80211_chswitch_post_beacon(link); + /* + * If the CSA IE is still present in the beacon after + * the switch, we need to consider it as a new CSA + * (possibly to self) - this happens by not returning + * here so we'll get to the check below. + */ + } else if (res) { ieee80211_sta_abort_chanswitch(link); - else + return; + } else { drv_channel_switch_rx_beacon(sdata, &ch_switch); - return; - } else if (link->conf->csa_active || res) { - /* disregard subsequent announcements if already processing */ - return; + return; + } } + /* nothing to do at all - no active CSA nor a new one */ + if (res) + return; + if (link->conf->chanreq.oper.chan->band != csa_ie.chanreq.oper.chan->band) { sdata_info(sdata, @@ -6299,9 +6308,6 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link, } } - if (link->u.mgd.csa_waiting_bcn) - ieee80211_chswitch_post_beacon(link); - /* * Update beacon timing and dtim count on every beacon appearance. This * will allow the driver to use the most updated values. Do it before @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11933:6d62da00" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11934:cbd1ef45" |