]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow AP mode configuration with VHT enabled on 2.4 GHz
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)
hostapd_set_freq_param() rejected the 20 MHz channel case with
vht_enabled due to the existing validation step including only 5 GHz (to
be more exact, only >= 5000 MHz). While the behavior may not be fully
defined for 2.4 GHz, we can enable this based on driver capability
advertisement to fix automatic VHT selection for P2P use cases.
mac80211_hwsim advertises VHT for 2.4 GHz band and that resulted in
failures when trying to start GO on that band with vht=1 parameter.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/ap/ap_drv_ops.c

index 8e1cc2bf0755a35b240661f8c9cba0f02b7914c3..0dc0600f20f9cfcea843fb3fe23702bdabaef001 100644 (file)
@@ -491,7 +491,8 @@ static int hostapd_set_freq_params(struct hostapd_freq_params *data, int mode,
        case VHT_CHANWIDTH_USE_HT:
                if (center_segment1)
                        return -1;
-               if (5000 + center_segment0 * 5 != data->center_freq1)
+               if (5000 + center_segment0 * 5 != data->center_freq1 &&
+                   2407 + center_segment0 * 5 != data->center_freq1)
                        return -1;
                break;
        case VHT_CHANWIDTH_80P80MHZ: