tests: HT40 co-ex scan finding an AP advertising 40 MHz intolerant
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
1887be4fa7
commit
50a19b0107
1 changed files with 40 additions and 0 deletions
|
@ -174,6 +174,46 @@ def test_ap_ht40_scan_ht20_conflict(dev, apdev):
|
||||||
|
|
||||||
dev[0].connect("test-ht40", key_mgmt="NONE", scan_freq=freq)
|
dev[0].connect("test-ht40", key_mgmt="NONE", scan_freq=freq)
|
||||||
|
|
||||||
|
def test_ap_ht40_scan_intolerant(dev, apdev):
|
||||||
|
"""HT40 co-ex scan finding an AP advertising 40 MHz intolerant"""
|
||||||
|
clear_scan_cache(apdev[0]['ifname'])
|
||||||
|
params = { "ssid": "another-bss",
|
||||||
|
"channel": "1",
|
||||||
|
"ht_capab": "[40-INTOLERANT]" }
|
||||||
|
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||||
|
|
||||||
|
params = { "ssid": "test-ht40",
|
||||||
|
"channel": "1",
|
||||||
|
"ht_capab": "[HT40+]"}
|
||||||
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||||
|
|
||||||
|
state = hapd.get_status_field("state")
|
||||||
|
if state != "HT_SCAN":
|
||||||
|
time.sleep(0.1)
|
||||||
|
state = hapd.get_status_field("state")
|
||||||
|
if state != "HT_SCAN":
|
||||||
|
raise Exception("Unexpected interface state - expected HT_SCAN")
|
||||||
|
|
||||||
|
ev = hapd.wait_event(["AP-ENABLED"], timeout=10)
|
||||||
|
if not ev:
|
||||||
|
raise Exception("AP setup timed out")
|
||||||
|
|
||||||
|
state = hapd.get_status_field("state")
|
||||||
|
if state != "ENABLED":
|
||||||
|
raise Exception("Unexpected interface state - expected ENABLED")
|
||||||
|
|
||||||
|
freq = hapd.get_status_field("freq")
|
||||||
|
if freq != "2412":
|
||||||
|
raise Exception("Unexpected frequency: " + freq)
|
||||||
|
pri = hapd.get_status_field("channel")
|
||||||
|
if pri != "1":
|
||||||
|
raise Exception("Unexpected primary channel: " + pri)
|
||||||
|
sec = hapd.get_status_field("secondary_channel")
|
||||||
|
if sec != "0":
|
||||||
|
raise Exception("Unexpected secondary channel: " + sec)
|
||||||
|
|
||||||
|
dev[0].connect("test-ht40", key_mgmt="NONE", scan_freq=freq)
|
||||||
|
|
||||||
def test_ap_ht40_scan_match(dev, apdev):
|
def test_ap_ht40_scan_match(dev, apdev):
|
||||||
"""HT40 co-ex scan matching configuration"""
|
"""HT40 co-ex scan matching configuration"""
|
||||||
clear_scan_cache(apdev[0]['ifname'])
|
clear_scan_cache(apdev[0]['ifname'])
|
||||||
|
|
Loading…
Reference in a new issue