]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Allow disabling VHT SGI capability
authorBen Greear <greearb@candelatech.com>
Wed, 28 Feb 2018 21:50:48 +0000 (13:50 -0800)
committerJouni Malinen <j@w1.fi>
Sun, 6 Jan 2019 18:59:36 +0000 (20:59 +0200)
This provides similar features to what was already available for HT
overrides. Probe Request frames look correct, and VHT capabilities shown
in debugfs look as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
wpa_supplicant/wpa_supplicant.c

index b990e94adeddb9b3ecb52a8310a9245d917d9467..9ca2c6b7b89983173b854c717a924e3e94cdfe94 100644 (file)
@@ -4642,6 +4642,16 @@ void wpa_supplicant_apply_vht_overrides(
        vhtcaps_mask->vht_capabilities_info = host_to_le32(ssid->vht_capa_mask);
 
 #ifdef CONFIG_HT_OVERRIDES
+       if (ssid->disable_sgi) {
+               vhtcaps_mask->vht_capabilities_info |= (VHT_CAP_SHORT_GI_80 |
+                                                       VHT_CAP_SHORT_GI_160);
+               vhtcaps->vht_capabilities_info &= ~(VHT_CAP_SHORT_GI_80 |
+                                                   VHT_CAP_SHORT_GI_160);
+               wpa_msg(wpa_s, MSG_DEBUG,
+                       "disable-sgi override specified, vht-caps: 0x%x",
+                       vhtcaps->vht_capabilities_info);
+       }
+
        /* if max ampdu is <= 3, we have to make the HT cap the same */
        if (ssid->vht_capa_mask & VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX) {
                int max_ampdu;