developer | b85e875 | 2023-09-25 14:16:05 +0800 | [diff] [blame^] | 1 | From d46e85faec291f813d6b5578122cd267421e84fa Mon Sep 17 00:00:00 2001 |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 2 | From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 3 | Date: Wed, 23 Aug 2023 17:44:50 +0800 |
developer | b85e875 | 2023-09-25 14:16:05 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 34/38] hostapd: mtk: update op_class when AP channel switching |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com> |
| 7 | --- |
| 8 | src/ap/drv_callbacks.c | 5 ++++- |
| 9 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c |
developer | b85e875 | 2023-09-25 14:16:05 +0800 | [diff] [blame^] | 12 | index e7f1f19..f749b33 100644 |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 13 | --- a/src/ap/drv_callbacks.c |
| 14 | +++ b/src/ap/drv_callbacks.c |
developer | b85e875 | 2023-09-25 14:16:05 +0800 | [diff] [blame^] | 15 | @@ -1041,7 +1041,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht, |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 16 | { |
| 17 | #ifdef NEED_AP_MLME |
| 18 | int channel, chwidth, is_dfs0, is_dfs; |
| 19 | - u8 seg0_idx = 0, seg1_idx = 0; |
| 20 | + u8 seg0_idx = 0, seg1_idx = 0, op_class, chan_no; |
| 21 | size_t i; |
| 22 | |
| 23 | hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, |
developer | b85e875 | 2023-09-25 14:16:05 +0800 | [diff] [blame^] | 24 | @@ -1169,6 +1169,9 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht, |
developer | bddc9db | 2023-09-11 13:34:36 +0800 | [diff] [blame] | 25 | hapd->iconf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; |
| 26 | |
| 27 | hapd->iconf->secondary_channel = offset; |
| 28 | + ieee80211_freq_to_channel_ext(freq, offset, chwidth, |
| 29 | + &op_class, &chan_no); |
| 30 | + hapd->iconf->op_class = op_class; |
| 31 | hostapd_set_oper_chwidth(hapd->iconf, chwidth); |
| 32 | hostapd_set_oper_centr_freq_seg0_idx(hapd->iconf, seg0_idx); |
| 33 | hostapd_set_oper_centr_freq_seg1_idx(hapd->iconf, seg1_idx); |
| 34 | -- |
| 35 | 2.18.0 |
| 36 | |