]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: Fix punct_update_legacy_bw_80() to correctly handle bitmap 0x9
authorAmith A <amitajit@qti.qualcomm.com>
Thu, 16 Oct 2025 06:59:53 +0000 (12:29 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 30 Oct 2025 10:53:31 +0000 (12:53 +0200)
punct_update_legacy_bw_80() is part of bandwidth downgrade mechanism
when preamble puncturing is applied on an 80 MHz wide channel.
Puncturing disables specific 20 MHz subchannels within its 80 MHz
bandwidth to mitigate interference. Depending on which subchannels are
affected, the bandwidth may be reduced to 40 MHz or 20 MHz. The
interference pattern is conveyed via a bitmap passed to this function.

Currently, the function yields incorrect results for a bitmap value of
0x9, which indicates interference in the first and fourth subchannels
of the 80 MHz band. This leaves only the middle two subchannels
available, which cannot form a valid 40 MHz channel. This scenario is
analogous to the case of bitmap 0x6, where the middle two subchannels
are punctured, also resulting in an invalid configuration.

To address this, the fix sets seg0 = 0 when the bitmap is 0x9,
consistent with the handling of bitmap 0x6, thereby ensuring the
bandwidth is correctly downgraded to 20 MHz.

Fixes: 46a5d989d4c1 ("EHT: Downgrade bandwidths for VHT and HE when using puncturing")
Signed-off-by: Amith A <amitajit@qti.qualcomm.com>
src/common/hw_features_common.c

index d9276b93541efaeb17ff8fae4ca3e6abfe005c3e..6f8eef2496cc94a20174b6fdaac3c66c935f7fae 100644 (file)
@@ -387,6 +387,7 @@ static void punct_update_legacy_bw_80(u8 bitmap, u8 pri_chan, u8 *seg0)
 
        switch (bitmap) {
        case 0x6:
+       case 0x9:
                *seg0 = 0;
                return;
        case 0x8: