]> git.ipfire.org Git - thirdparty/hostap.git/commit
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)
commit7d8d073e885c80eb4c2f5588c6a511aaad7dc50e
treed16fd9642491ab6314c2e0a4cac3716e1a39a429
parent0a637fb96d98a1d69e4e021f1b556f5b2f6af76a
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 <amitajit@qti.qualcomm.com>
src/common/hw_features_common.c