tests: max_listen_interval rejecting association
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8abb3d4ea3
commit
11a4c910ea
1 changed files with 14 additions and 0 deletions
|
@ -196,3 +196,17 @@ def test_ap_spectrum_management_required(dev, apdev):
|
||||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="5180")
|
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="5180")
|
||||||
finally:
|
finally:
|
||||||
subprocess.call(['sudo', 'iw', 'reg', 'set', '00'])
|
subprocess.call(['sudo', 'iw', 'reg', 'set', '00'])
|
||||||
|
|
||||||
|
def test_ap_max_listen_interval(dev, apdev):
|
||||||
|
"""Open AP with maximum listen interval limit"""
|
||||||
|
ssid = "listen"
|
||||||
|
params = {}
|
||||||
|
params['ssid'] = ssid
|
||||||
|
params['max_listen_interval'] = "1"
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
|
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412", wait_connect=False)
|
||||||
|
ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"])
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Association rejection not reported")
|
||||||
|
if "status_code=51" not in ev:
|
||||||
|
raise Exception("Unexpected ASSOC-REJECT reason")
|
||||||
|
|
Loading…
Add table
Reference in a new issue