tests: Require HT/VHT as BSS membership selector in Supp Rates
authorJouni Malinen <j@w1.fi>
Sat, 29 Mar 2014 08:39:32 +0000 (10:39 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 29 Mar 2014 08:39:32 +0000 (10:39 +0200)
These are similar to the previous cases, but with supported rate set
limited to allow the BSS membership selector to fit into that element
instead of Ext Supp Rates.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_ht.py
tests/hwsim/test_ap_vht.py

index 8f1489e..1410757 100644 (file)
@@ -390,3 +390,19 @@ def test_ap_require_ht(dev, apdev):
         raise Exception("Association rejection timed out")
     if "status_code=27" not in ev:
         raise Exception("Unexpected rejection status code")
+
+def test_ap_require_ht_limited_rates(dev, apdev):
+    """Require HT with limited supported rates"""
+    params = { "ssid": "require-ht",
+               "supported_rates": "60 120 240 360 480 540",
+               "require_ht": "1" }
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
+
+    dev[1].connect("require-ht", key_mgmt="NONE", scan_freq="2412",
+                   disable_ht="1", wait_connect=False)
+    dev[0].connect("require-ht", key_mgmt="NONE", scan_freq="2412")
+    ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"])
+    if ev is None:
+        raise Exception("Association rejection timed out")
+    if "status_code=27" not in ev:
+        raise Exception("Unexpected rejection status code")
index c198d9b..be23458 100644 (file)
@@ -93,6 +93,7 @@ def test_ap_vht_20(devs, apdevs):
                    "vht_capab": "",
                    "vht_oper_chwidth": "0",
                    "vht_oper_centr_freq_seg0_idx": "0",
+                   "supported_rates": "60 120 240 360 480 540",
                    "require_vht": "1",
                  }
         hostapd.add_ap(ap['ifname'], params)