]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: remove NPCA during chandef downgrade
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 Apr 2026 09:25:35 +0000 (11:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 May 2026 12:49:03 +0000 (14:49 +0200)
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>
net/mac80211/util.c

index 00e46b5bc0201adaa1132eed754149aff2981a1e..24537794256c30e496f0f0f3428763564eaf26c8 100644 (file)
@@ -3832,6 +3832,10 @@ again:
                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.