blob: 5cf0a252cacc5bd0b1405388c19a2370921f85d0 [file] [log] [blame]
developerf9b00212023-07-31 12:27:06 +08001From d35d35ed5575bb31d614a7dee8afd24bc2b1fcfa Mon Sep 17 00:00:00 2001
developer8b64f1a2023-05-02 10:31:58 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Thu, 30 Mar 2023 17:03:03 +0800
developerf9b00212023-07-31 12:27:06 +08004Subject: [PATCH 30/35] hostapd: mtk: Fix setting wrong seg0 index for 5G
developer8b64f1a2023-05-02 10:31:58 +08005 center chan 159 BW40
6
7Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
8---
9 src/ap/ap_config.h | 3 ++-
10 1 file changed, 2 insertions(+), 1 deletion(-)
11
12diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
13index 51476b8..ae22a2f 100644
14--- a/src/ap/ap_config.h
15+++ b/src/ap/ap_config.h
16@@ -1275,7 +1275,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
17 #ifdef CONFIG_IEEE80211BE
18 if (conf->ieee80211be)
19 conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
20- if (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
21+ if (is_6ghz_op_class(conf->op_class) &&
22+ center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
23 oper_centr_freq_seg0_idx +=
24 conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
25 #endif /* CONFIG_IEEE80211BE */
26--
272.18.0
28