| From 80eac0c00795cccd43db3c972a6c903dda55f4b0 Mon Sep 17 00:00:00 2001 |
| From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| Date: Mon, 29 Apr 2024 10:52:31 +0800 |
| Subject: [PATCH 082/126] mtk: hostapd: update op_class in channel switch |
| fallback |
| |
| Switching to a DFS channel includes an AP interface teardown and setup. |
| An op_class update is necessary for passing the channel information |
| check during setup. |
| |
| Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| --- |
| src/ap/hostapd.c | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c |
| index fe41f1821..2c9e54b23 100644 |
| --- a/src/ap/hostapd.c |
| +++ b/src/ap/hostapd.c |
| @@ -4710,6 +4710,10 @@ hostapd_switch_channel_fallback(struct hostapd_iface *iface, |
| iface->conf->ieee80211ac = freq_params->vht_enabled; |
| iface->conf->ieee80211ax = freq_params->he_enabled; |
| iface->conf->ieee80211be = freq_params->eht_enabled; |
| + if (ieee80211_freq_to_channel_ext(iface->freq, iface->conf->secondary_channel, |
| + hostapd_get_oper_chwidth(iface->conf), |
| + &op_class, &chan) != NUM_HOSTAPD_MODES) |
| + iface->conf->op_class = op_class; |
| |
| /* |
| * cs_params must not be cleared earlier because the freq_params |
| -- |
| 2.18.0 |
| |