supplicant: Allow disabling VHT sgi capability bits

Message ID 1519854648-26566-1-git-send-email-greearb@candelatech.com
State New
Headers show
Series
  • supplicant: Allow disabling VHT sgi capability bits
Related show

Commit Message

Ben Greear Feb. 28, 2018, 9:50 p.m.
From: Ben Greear <greearb@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@candelatech.com>
---
 wpa_supplicant/wpa_supplicant.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

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;