From a7684a21c79363a5e2461c0295cfea20974901b8 Mon Sep 17 00:00:00 2001 From: Sunil Ravi Date: Wed, 10 Aug 2022 22:56:55 +0000 Subject: [PATCH] Update hw mode after ACS selects the channel hostapd based automatic channel selection doesn't update the hardware mode after the channel is selected. This change specifically helps channel 14 which can operate only in IEEE 802.11b mode. Signed-off-by: Sunil Ravi --- src/ap/acs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ap/acs.c b/src/ap/acs.c index d06e55f5d..8ee2e04a2 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -1007,6 +1007,15 @@ static void acs_study(struct hostapd_iface *iface) if (iface->conf->ieee80211ac || iface->conf->ieee80211ax) acs_adjust_center_freq(iface); + err = hostapd_select_hw_mode(iface); + if (err) { + wpa_printf(MSG_ERROR, + "ACS: Could not (err: %d) select hw_mode for freq=%d channel=%d", + err, iface->freq, iface->conf->channel); + err = -1; + goto fail; + } + err = 0; fail: /*