Skip to content

Commit

Permalink
wifi: mac80211: fix puncturing bitmap handling in CSA
Browse files Browse the repository at this point in the history
Code inspection reveals that we switch the puncturing bitmap
before the real channel switch, since that happens only in
the second round of the worker after the channel context is
switched by ieee80211_link_use_reserved_context().

Fixes: 2cc25e4 ("wifi: mac80211: configure puncturing bitmap")
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Aug 22, 2023
1 parent fba360a commit 9275211
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3648,12 +3648,6 @@ static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
lockdep_assert_held(&local->mtx);
lockdep_assert_held(&local->chanctx_mtx);

if (sdata->vif.bss_conf.eht_puncturing != sdata->vif.bss_conf.csa_punct_bitmap) {
sdata->vif.bss_conf.eht_puncturing =
sdata->vif.bss_conf.csa_punct_bitmap;
changed |= BSS_CHANGED_EHT_PUNCTURING;
}

/*
* using reservation isn't immediate as it may be deferred until later
* with multi-vif. once reservation is complete it will re-schedule the
Expand Down Expand Up @@ -3683,6 +3677,12 @@ static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
if (err)
return err;

if (sdata->vif.bss_conf.eht_puncturing != sdata->vif.bss_conf.csa_punct_bitmap) {
sdata->vif.bss_conf.eht_puncturing =
sdata->vif.bss_conf.csa_punct_bitmap;
changed |= BSS_CHANGED_EHT_PUNCTURING;
}

ieee80211_link_info_change_notify(sdata, &sdata->deflink, changed);

if (sdata->deflink.csa_block_tx) {
Expand Down

0 comments on commit 9275211

Please sign in to comment.