wifi: mac80211: remove NPCA during chandef downgrade

We can't use NPCA any more if the chandef was downgraded,
for obvious reasons. Clear NPCA during any downgrade.

Link: https://patch.msgid.link/20260428112708.2ab0e6f2e433.Ic39badb6782ef2242942424538f57e4a83391a06@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-04-28 11:25:35 +02:00
parent ee52966a00
commit 8d66c383ed

View File

@ -3832,6 +3832,10 @@ void ieee80211_chandef_downgrade(struct cfg80211_chan_def *c,
c->width = new_primary_width;
}
/* whatever we do, downgrading removes NPCA */
c->npca_chan = NULL;
c->npca_punctured = 0;
/*
* With an 80 MHz channel, we might have the puncturing in the primary
* 40 Mhz channel, but that's not valid when downgraded to 40 MHz width.