From: Amith A Date: Thu, 16 Oct 2025 06:59:53 +0000 (+0530) Subject: EHT: Fix punct_update_legacy_bw_80() to correctly handle bitmap 0x9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d8d073e885c80eb4c2f5588c6a511aaad7dc50e;p=thirdparty%2Fhostap.git EHT: Fix punct_update_legacy_bw_80() to correctly handle bitmap 0x9 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 --- diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c index d9276b935..6f8eef249 100644 --- a/src/common/hw_features_common.c +++ b/src/common/hw_features_common.c @@ -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: