From: Sunil Ravi Date: Wed, 10 Aug 2022 22:56:55 +0000 (+0000) Subject: Update hw mode after ACS selects the channel X-Git-Tag: hostap_2_11~1685 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7684a21c79363a5e2461c0295cfea20974901b8;p=thirdparty%2Fhostap.git 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 --- 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: /*