developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 1 | From 80eac0c00795cccd43db3c972a6c903dda55f4b0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 3 | Date: Mon, 29 Apr 2024 10:52:31 +0800 |
| 4 | Subject: [PATCH 082/126] mtk: hostapd: update op_class in channel switch |
| 5 | fallback |
| 6 | |
| 7 | Switching to a DFS channel includes an AP interface teardown and setup. |
| 8 | An op_class update is necessary for passing the channel information |
| 9 | check during setup. |
| 10 | |
| 11 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 12 | Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 13 | --- |
| 14 | src/ap/hostapd.c | 4 ++++ |
| 15 | 1 file changed, 4 insertions(+) |
| 16 | |
| 17 | diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c |
| 18 | index fe41f1821..2c9e54b23 100644 |
| 19 | --- a/src/ap/hostapd.c |
| 20 | +++ b/src/ap/hostapd.c |
| 21 | @@ -4710,6 +4710,10 @@ hostapd_switch_channel_fallback(struct hostapd_iface *iface, |
| 22 | iface->conf->ieee80211ac = freq_params->vht_enabled; |
| 23 | iface->conf->ieee80211ax = freq_params->he_enabled; |
| 24 | iface->conf->ieee80211be = freq_params->eht_enabled; |
| 25 | + if (ieee80211_freq_to_channel_ext(iface->freq, iface->conf->secondary_channel, |
| 26 | + hostapd_get_oper_chwidth(iface->conf), |
| 27 | + &op_class, &chan) != NUM_HOSTAPD_MODES) |
| 28 | + iface->conf->op_class = op_class; |
| 29 | |
| 30 | /* |
| 31 | * cs_params must not be cleared earlier because the freq_params |
| 32 | -- |
| 33 | 2.18.0 |
| 34 | |