[PATCH] supplicant: Allow disabling VHT sgi capability bits

greearb at candelatech.com greearb at candelatech.com
Wed Feb 28 13:50:48 PST 2018


From: Ben Greear <greearb at candelatech.com>

This provides similar features to what was already available
for HT overrides.  Probe requests look correct, and vht
capabilities shown in debugfs look as expected.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 wpa_supplicant/wpa_supplicant.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index d4f528b..46eca5d 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4644,6 +4644,12 @@ 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 (ssid->max_oper_chwidth != VHT_CHANWIDTH_USE_HT) { // USE_HT is default value for this, ignore it.
 		vhtcaps_mask->vht_capabilities_info |= VHT_CAP_SUPP_CHAN_WIDTH_MASK;
 		vhtcaps->vht_capabilities_info &= ~VHT_CAP_SUPP_CHAN_WIDTH_MASK;
-- 
2.7.5




More information about the Hostap mailing list