From fdc02e4caf1b4e5f1fb99089a8492f228743ee54 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 29 Mar 2014 10:39:32 +0200 Subject: [PATCH] tests: Require HT/VHT as BSS membership selector in Supp Rates 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 --- tests/hwsim/test_ap_ht.py | 16 ++++++++++++++++ tests/hwsim/test_ap_vht.py | 1 + 2 files changed, 17 insertions(+) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 8f1489e19..14107579d 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -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") diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index c198d9b0a..be23458d4 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -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)