]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Always allow HE AP with a 20 MHz channel width
authorCedric Izoard <cedric.izoard@ceva-dsp.com>
Fri, 30 Apr 2021 06:48:26 +0000 (08:48 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Aug 2021 12:58:10 +0000 (15:58 +0300)
Skip the test of HE PHY capability bit "Support for a 40 MHz and 80 MHz
channel width" when starting an AP with a 20 MHz channel on the 5 GHz
band.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
src/common/hw_features_common.c

index ad2aebfef5b540328a5e35246a9fa4344fb83ba2..304139e463f6c2c5ca948b7db2474fa45e43600f 100644 (file)
@@ -491,7 +491,10 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
 
        if (data->he_enabled) switch (oper_chwidth) {
        case CHANWIDTH_USE_HT:
-               if (mode == HOSTAPD_MODE_IEEE80211G && sec_channel_offset) {
+               if (sec_channel_offset == 0)
+                       break;
+
+               if (mode == HOSTAPD_MODE_IEEE80211G) {
                        if (!(he_cap->phy_cap[HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
                              HE_PHYCAP_CHANNEL_WIDTH_SET_40MHZ_IN_2G)) {
                                wpa_printf(MSG_ERROR,