]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix 5 GHz to 2.4 GHz channel switch with hostapd through DISABLE/ENABLE
authorSathishkumar Muruganandam <murugana@codeaurora.org>
Mon, 15 Oct 2018 15:07:49 +0000 (20:37 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 15 Oct 2018 21:50:40 +0000 (00:50 +0300)
When moving a 5 GHz VHT AP to 2.4 GHz band with VHT disabled through the
hostapd control interface DISABLE/reconfig/ENABLE commands, enabling of
the AP on 2.4 GHz failed due to the previously configured VHT capability
being compared with hardware VHT capability on 2.4 GHz band:

hw vht capab: 0x0, conf vht capab: 0x33800132
Configured VHT capability [VHT_CAP_MAX_MPDU_LENGTH_MASK] exceeds max value supported by the driver (2 > 0)
ap: interface state DISABLED->DISABLED

Since VHT (ieee80211ac) config is already disabled for the 2.4 GHz band,
add fix this by validating vht_capab only when VHT is enabled.

Fixes: c781eb842852 ("hostapd: Verify VHT capabilities are supported by driver")
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
src/ap/hw_features.c

index 84e74eef0ce2e9eeaf4cdd679303ef50d1a06533..5279abca1f1faef03f4f84126f40a17f7466e32d 100644 (file)
@@ -679,7 +679,8 @@ int hostapd_check_ht_capab(struct hostapd_iface *iface)
        if (!ieee80211n_supported_ht_capab(iface))
                return -1;
 #ifdef CONFIG_IEEE80211AC
-       if (!ieee80211ac_supported_vht_capab(iface))
+       if (iface->conf->ieee80211ac &&
+           !ieee80211ac_supported_vht_capab(iface))
                return -1;
 #endif /* CONFIG_IEEE80211AC */
        ret = ieee80211n_check_40mhz(iface);