tests: HT 20/40 co-ex functionality during BSS lifetime
Verify that AP acts on 40 MHz intolerant STA association/disassociation and on 20/40 co-ex report indicating 40 MHz intolerant AP showed up and removed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
13a524a30d
commit
bd6bb3e37b
2 changed files with 80 additions and 1 deletions
|
@ -462,3 +462,81 @@ def test_ap_ht_capab_not_supported(dev, apdev):
|
||||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||||
if "FAIL" not in hapd.request("ENABLE"):
|
if "FAIL" not in hapd.request("ENABLE"):
|
||||||
raise Exception("Unexpected ENABLE success")
|
raise Exception("Unexpected ENABLE success")
|
||||||
|
|
||||||
|
def test_ap_ht_40mhz_intolerant_sta(dev, apdev):
|
||||||
|
"""Associated STA indicating 40 MHz intolerant"""
|
||||||
|
params = { "ssid": "intolerant",
|
||||||
|
"channel": "6",
|
||||||
|
"ht_capab": "[HT40-]" }
|
||||||
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
|
if hapd.get_status_field("num_sta_ht40_intolerant") != "0":
|
||||||
|
raise Exception("Unexpected num_sta_ht40_intolerant value")
|
||||||
|
if hapd.get_status_field("secondary_channel") != "-1":
|
||||||
|
raise Exception("Unexpected secondary_channel")
|
||||||
|
|
||||||
|
dev[0].connect("intolerant", key_mgmt="NONE", scan_freq="2437")
|
||||||
|
if hapd.get_status_field("num_sta_ht40_intolerant") != "0":
|
||||||
|
raise Exception("Unexpected num_sta_ht40_intolerant value")
|
||||||
|
if hapd.get_status_field("secondary_channel") != "-1":
|
||||||
|
raise Exception("Unexpected secondary_channel")
|
||||||
|
|
||||||
|
dev[2].connect("intolerant", key_mgmt="NONE", scan_freq="2437",
|
||||||
|
ht40_intolerant="1")
|
||||||
|
time.sleep(1)
|
||||||
|
if hapd.get_status_field("num_sta_ht40_intolerant") != "1":
|
||||||
|
raise Exception("Unexpected num_sta_ht40_intolerant value (expected 1)")
|
||||||
|
if hapd.get_status_field("secondary_channel") != "0":
|
||||||
|
raise Exception("Unexpected secondary_channel (did not disable 40 MHz)")
|
||||||
|
|
||||||
|
dev[2].request("DISCONNECT")
|
||||||
|
time.sleep(1)
|
||||||
|
if hapd.get_status_field("num_sta_ht40_intolerant") != "0":
|
||||||
|
raise Exception("Unexpected num_sta_ht40_intolerant value (expected 0)")
|
||||||
|
if hapd.get_status_field("secondary_channel") != "-1":
|
||||||
|
raise Exception("Unexpected secondary_channel (did not re-enable 40 MHz)")
|
||||||
|
|
||||||
|
def test_ap_ht_40mhz_intolerant_ap(dev, apdev):
|
||||||
|
"""Associated STA reports 40 MHz intolerant AP after association"""
|
||||||
|
params = { "ssid": "ht",
|
||||||
|
"channel": "6",
|
||||||
|
"ht_capab": "[HT40-]",
|
||||||
|
"obss_interval": "1" }
|
||||||
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
|
|
||||||
|
dev[0].connect("ht", key_mgmt="NONE", scan_freq="2437")
|
||||||
|
|
||||||
|
if hapd.get_status_field("secondary_channel") != "-1":
|
||||||
|
raise Exception("Unexpected secondary channel information")
|
||||||
|
|
||||||
|
logger.info("Start 40 MHz intolerant AP")
|
||||||
|
params = { "ssid": "intolerant",
|
||||||
|
"channel": "5",
|
||||||
|
"ht_capab": "[40-INTOLERANT]" }
|
||||||
|
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||||
|
|
||||||
|
logger.info("Waiting for co-ex report from STA")
|
||||||
|
ok = False
|
||||||
|
for i in range(0, 20):
|
||||||
|
time.sleep(1)
|
||||||
|
if hapd.get_status_field("secondary_channel") == "0":
|
||||||
|
logger.info("AP moved to 20 MHz channel")
|
||||||
|
ok = True
|
||||||
|
break
|
||||||
|
if not ok:
|
||||||
|
raise Exception("AP did not move to 20 MHz channel")
|
||||||
|
|
||||||
|
if "OK" not in hapd2.request("DISABLE"):
|
||||||
|
raise Exception("Failed to disable 40 MHz intolerant AP")
|
||||||
|
|
||||||
|
# make sure the intolerant AP disappears from scan results more quickly
|
||||||
|
dev[0].scan(only_new=True)
|
||||||
|
dev[0].scan(freq="2432", only_new=True)
|
||||||
|
|
||||||
|
logger.info("Waiting for AP to move back to 40 MHz channel")
|
||||||
|
ok = False
|
||||||
|
for i in range(0, 30):
|
||||||
|
time.sleep(1)
|
||||||
|
if hapd.get_status_field("secondary_channel") == "-1":
|
||||||
|
ok = True
|
||||||
|
if not ok:
|
||||||
|
raise Exception("AP did not move to 40 MHz channel")
|
||||||
|
|
|
@ -658,7 +658,8 @@ class WpaSupplicant:
|
||||||
"eapol_flags", "fragment_size", "scan_ssid", "auth_alg",
|
"eapol_flags", "fragment_size", "scan_ssid", "auth_alg",
|
||||||
"wpa_ptk_rekey", "disable_ht", "disable_vht", "bssid",
|
"wpa_ptk_rekey", "disable_ht", "disable_vht", "bssid",
|
||||||
"disable_max_amsdu", "ampdu_factor", "ampdu_density",
|
"disable_max_amsdu", "ampdu_factor", "ampdu_density",
|
||||||
"disable_ht40", "disable_sgi", "disable_ldpc" ]
|
"disable_ht40", "disable_sgi", "disable_ldpc",
|
||||||
|
"ht40_intolerant" ]
|
||||||
for field in not_quoted:
|
for field in not_quoted:
|
||||||
if field in kwargs and kwargs[field]:
|
if field in kwargs and kwargs[field]:
|
||||||
self.set_network(id, field, kwargs[field])
|
self.set_network(id, field, kwargs[field])
|
||||||
|
|
Loading…
Reference in a new issue