blob: 84be9e03e21a0a6be126a8862646e3bf1add45e7 [file] [log] [blame]
From da108d74412d83264355fe453a8d2ffc6f99fa86 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:23:00 +0800
Subject: [PATCH 23/54] mtk: hostapd: Fix setting wrong seg0 index for 5G
center chan 159 BW40
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.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 d0e27b28d..f03a957b7 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1308,7 +1308,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.18.0