blob: b7812cdd5d4c638ecee848f4e7d0a637e083a8c9 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 80eac0c00795cccd43db3c972a6c903dda55f4b0 Mon Sep 17 00:00:00 2001
2From: Michael-CY Lee <michael-cy.lee@mediatek.com>
3Date: Mon, 29 Apr 2024 10:52:31 +0800
4Subject: [PATCH 082/126] mtk: hostapd: update op_class in channel switch
5 fallback
6
7Switching to a DFS channel includes an AP interface teardown and setup.
8An op_class update is necessary for passing the channel information
9check during setup.
10
11Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
12Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
13---
14 src/ap/hostapd.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
18index 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--
332.18.0
34