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>
switch (bitmap) {
case 0x6:
+ case 0x9:
*seg0 = 0;
return;
case 0x8: