Compare commits

...

1 Commits

Author SHA1 Message Date
Venkat Chimata
a5f26be0d0 hostapd: fix 6 GHz center frequency adjustment condition
Ensure that the center frequency segment 0 index adjustment for
320 MHz bandwidth is applied only for valid 6 GHz frequencies.

Previously, the bandwidth check alone could trigger the adjustment
even when the operating center index did not correspond to a 6 GHz
frequency. Add an explicit is_6ghz_freq() check to avoid incorrect
center frequency offset calculations.

Fixes: WIFI-15238

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-01-23 00:47:21 +05:30

View File

@@ -0,0 +1,34 @@
From 406807b134f88ec038ee120a0a0085e140e96313 Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkat@nearhop.com>
Date: Fri, 23 Jan 2026 00:31:13 +0530
Subject: [PATCH] hostapd: fix 6 GHz center frequency adjustment condition
Ensure that the center frequency segment 0 index adjustment for
320 MHz bandwidth is applied only for valid 6 GHz frequencies.
Previously, the bandwidth check alone could trigger the adjustment
even when the operating center index did not correspond to a 6 GHz
frequency. Add an explicit is_6ghz_freq() check to avoid incorrect
center frequency offset calculations.
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
---
src/ap/ap_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index dfd895e..b6c2a4a 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1306,7 +1306,7 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
#ifdef CONFIG_IEEE80211BE
if (conf->ieee80211be)
conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
- if (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
+ if (is_6ghz_freq(conf->channel) && (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4))
oper_centr_freq_seg0_idx +=
conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
--
2.34.1