]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Update hw mode after ACS selects the channel
authorSunil Ravi <sunilravi@google.com>
Wed, 10 Aug 2022 22:56:55 +0000 (22:56 +0000)
committerJouni Malinen <j@w1.fi>
Thu, 22 Sep 2022 21:23:56 +0000 (00:23 +0300)
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 <sunilravi@google.com>
src/ap/acs.c

index d06e55f5d5eaae48735e98ccfdb37624d12968d1..8ee2e04a2c35c3ffc32649158bd996d7c41caba1 100644 (file)
@@ -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:
        /*