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)