[PATCH] EHT: Fix updating center freq segment 0 index for HE and VHT
Mikelis Vuls
mvuls at maxlinear.com
Mon Dec 4 04:27:48 PST 2023
Added additional check for 6GHz OP class.
Otherwise this results in setting incorrect segment 0 index for 5GHz
40 MHz channel 157--161, which has the same center segment 0 index
159 as 6GHz 320MHz expected channel
Signed-off-by: Mikelis Vuls <mvuls at maxlinear.com>
---
src/ap/ap_config.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 5699a6be1..a8aafee3c 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1240,7 +1240,8 @@ 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_op_class(conf->op_class) &&
+ 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;
#endif /* CONFIG_IEEE80211BE */
--
2.17.1
More information about the Hostap
mailing list