developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame^] | 1 | From f229416c4283da4a2f3b264285a5d97fdc8dcc96 Mon Sep 17 00:00:00 2001 |
| 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| 3 | Date: Fri, 12 May 2023 05:23:00 +0800 |
| 4 | Subject: [PATCH 27/28] hostapd: mtk: Fix setting wrong seg0 index for 5G |
developer | eb4c63d | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 5 | center chan 159 BW40 |
| 6 | |
| 7 | Signed-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 | |
| 12 | diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame^] | 13 | index b9aaa85..9df0b2c 100644 |
developer | eb4c63d | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 14 | --- a/src/ap/ap_config.h |
| 15 | +++ b/src/ap/ap_config.h |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame^] | 16 | @@ -1294,7 +1294,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf, |
developer | eb4c63d | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 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 | -- |
| 27 | 2.18.0 |
| 28 | |