]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: Fix 6 GHz HE operation bandwidth for 320 MHz with puncturing
authorMohan Kumar G <quic_mkumarg@quicinc.com>
Wed, 22 Jan 2025 19:06:34 +0000 (00:36 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 5 Feb 2025 21:20:00 +0000 (23:20 +0200)
Channel width and center frequencies were updated incorrectly into the
HE Operation element when the AP is configured to use a 6 GHz 320 MHz
channel with a puncturing bitmap.

In hostapd_eid_he_operation(), punct_bitmap corresponds to 320 MHz while
oper_chwidth and seg0 are set for 160 MHz. When calculating legacy
bandwidth, punct_update_legacy_bw() uses only the first 160 MHz
puncturing bitmap and if the primary channel is in the second 160 MHz
segment, incorrect values are calculated for legacy bandwidth and center
frequencies.

Fix this issue by using the EHT operating channel width and center
frequency to calculate legacy bandwidth when puncturing is enabled.

Fixes: 2552de375db5 ("EHT: Fix HE center frequency for EHT 320 MHz with puncturing")
Signed-off-by: Mohan Kumar G <quic_mkumarg@quicinc.com>
src/ap/ieee802_11_he.c

index cd9f8bc595140aeaf89eecefe6ddf514e043900c..cc731b9140bebbf42eeb1308ba55f87d0b9be3be 100644 (file)
@@ -229,6 +229,9 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
                u16 punct_bitmap = hostapd_get_punct_bitmap(hapd);
 
                if (punct_bitmap) {
+                       oper_chwidth = hostapd_get_oper_chwidth(hapd->iconf);
+                       seg0 = hostapd_get_oper_centr_freq_seg0_idx(
+                               hapd->iconf);
                        punct_update_legacy_bw(punct_bitmap,
                                               hapd->iconf->channel,
                                               &oper_chwidth, &seg0, &seg1);