Allow HT 40 MHz intolerant flag to be set for association
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 15 Apr 2014 14:22:47 +0000 (17:22 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 17 Apr 2014 14:11:17 +0000 (17:11 +0300)
This extends HT overrides to allow HT 40 MHz intolerant flag to be set
with ht40_intolerant=1.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/config.c
wpa_supplicant/config_ssid.h
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant.conf

index 74283eb..b4ee1f5 100644 (file)
@@ -1702,6 +1702,7 @@ static const struct parse_data ssid_fields[] = {
        { INT_RANGE(disable_ht40, -1, 1) },
        { INT_RANGE(disable_sgi, 0, 1) },
        { INT_RANGE(disable_ldpc, 0, 1) },
+       { INT_RANGE(ht40_intolerant, 0, 1) },
        { INT_RANGE(disable_max_amsdu, -1, 1) },
        { INT_RANGE(ampdu_factor, -1, 3) },
        { INT_RANGE(ampdu_density, -1, 7) },
index 71829ef..a458990 100644 (file)
@@ -534,6 +534,11 @@ struct wpa_ssid {
        int disable_ldpc;
 
        /**
+        * ht40_intolerant - Indicate 40 MHz intolerant for this network
+        */
+       int ht40_intolerant;
+
+       /**
         * disable_max_amsdu - Disable MAX A-MSDU
         *
         * A-MDSU will be 3839 bytes when disabled, or 7935
index 7285bec..5d9cbf7 100644 (file)
@@ -2967,6 +2967,12 @@ void wpa_supplicant_apply_ht_overrides(
        wpa_set_disable_ht40(wpa_s, htcaps, htcaps_mask, ssid->disable_ht40);
        wpa_set_disable_sgi(wpa_s, htcaps, htcaps_mask, ssid->disable_sgi);
        wpa_set_disable_ldpc(wpa_s, htcaps, htcaps_mask, ssid->disable_ldpc);
+
+       if (ssid->ht40_intolerant) {
+               u16 bit = host_to_le16(HT_CAP_INFO_40MHZ_INTOLERANT);
+               htcaps->ht_capabilities_info |= bit;
+               htcaps_mask->ht_capabilities_info |= bit;
+       }
 }
 
 #endif /* CONFIG_HT_OVERRIDES */
index 629d886..86a4621 100644 (file)
@@ -951,6 +951,10 @@ fast_reauth=1
 # 0 = LDPC enabled (if AP supports it)
 # 1 = LDPC disabled
 #
+# ht40_intolerant: Whether 40 MHz intolerant should be indicated.
+# 0 = 40 MHz tolerant (default)
+# 1 = 40 MHz intolerant
+#
 # ht_mcs:  Configure allowed MCS rates.
 #  Parsed as an array of bytes, in base-16 (ascii-hex)
 # ht_mcs=""                                   // Use all available (default)