tests: Extend estimated throughput testing

Cover VHT160 and HE cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2021-05-07 13:05:21 +03:00 committed by Jouni Malinen
parent 46f8976196
commit 2b6915a139
2 changed files with 39 additions and 1 deletions

View file

@ -369,6 +369,7 @@ def test_ap_vht160(dev, apdev):
'ieee80211d': '1',
'ieee80211h': '1'}
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
bssid = apdev[0]['bssid']
ev = wait_dfs_event(hapd, "DFS-CAC-START", 5)
if "DFS-CAC-START" not in ev:
@ -408,6 +409,10 @@ def test_ap_vht160(dev, apdev):
if "WIDTH=160 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
est = dev[0].get_bss(bssid)['est_throughput']
if est != "780001":
raise Exception("Unexpected BSS est_throughput: " + est)
sta = hapd.get_sta(dev[0].own_addr())
if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
raise Exception("No Supported Operating Classes information for STA")

View file

@ -150,7 +150,7 @@ def test_he80(dev, apdev):
if "WIDTH=80 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
est = dev[0].get_bss(bssid)['est_throughput']
if est != "390001":
if est != "600502":
raise Exception("Unexpected BSS est_throughput: " + est)
status = dev[0].get_status()
if status["ieee80211ac"] != "1":
@ -492,6 +492,7 @@ def test_he160(dev, apdev):
'ieee80211d': '1',
'ieee80211h': '1'}
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
bssid = apdev[0]['bssid']
ev = wait_dfs_event(hapd, "DFS-CAC-START", 5)
if "DFS-CAC-START" not in ev:
@ -530,6 +531,9 @@ def test_he160(dev, apdev):
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
if "WIDTH=160 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
est = dev[0].get_bss(bssid)['est_throughput']
if est != "1201002":
raise Exception("Unexpected BSS est_throughput: " + est)
except Exception as e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not he_supported():
@ -1186,3 +1190,32 @@ def test_he_6ghz_security(dev, apdev):
hapd.set("group_cipher", "TKIP")
if "FAIL" not in hapd.request("ENABLE"):
raise Exception("Invalid configuration accepted(5)")
def test_he_prefer_he20(dev, apdev):
"""Preference on HE20 over HT20"""
params = {"ssid": "he",
"channel": "1",
"ieee80211ax": "0",
"ieee80211n": "1"}
hapd = hostapd.add_ap(apdev[0], params)
bssid = apdev[0]['bssid']
params = {"ssid": "test",
"channel": "1",
"ieee80211ax": "1",
"ieee80211n": "1"}
hapd2 = hostapd.add_ap(apdev[1], params)
bssid2 = apdev[1]['bssid']
dev[0].scan_for_bss(bssid, freq=2412)
dev[0].scan_for_bss(bssid2, freq=2412)
dev[0].connect("test", key_mgmt="NONE", scan_freq="2412")
if dev[0].get_status_field('bssid') != bssid2:
raise Exception("Unexpected BSS selected")
est = dev[0].get_bss(bssid)['est_throughput']
if est != "65000":
raise Exception("Unexpected BSS0 est_throughput: " + est)
est = dev[0].get_bss(bssid2)['est_throughput']
if est != "143402":
raise Exception("Unexpected BSS1 est_throughput: " + est)