tests: HE and TWT

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-03-07 22:08:52 +02:00
parent 7fd2f24962
commit 9216929ab6

View file

@ -1094,3 +1094,21 @@ def test_he80_to_24g_he(dev, apdev):
finally: finally:
dev[0].request("DISCONNECT") dev[0].request("DISCONNECT")
clear_regdom(hapd, dev) clear_regdom(hapd, dev)
def test_he_twt(dev, apdev):
"""HE and TWT"""
params = {"ssid": "he",
"ieee80211ax": "1",
"he_bss_color": "42",
"he_twt_required":"1"}
hapd = hostapd.add_ap(apdev[0], params)
dev[0].connect("he", key_mgmt="NONE", scan_freq="2412")
if "OK" not in dev[0].request("TWT_SETUP"):
raise Exception("TWT_SETUP failed")
if "OK" not in dev[0].request("TWT_TEARDOWN"):
raise Exception("TWT_SETUP failed")
if "OK" not in dev[0].request("TWT_SETUP dialog=123 exponent=9 mantissa=10 min_twt=254 setup_cmd=1 twt=1234567890 requestor=1 trigger=0 implicit=0 flow_type=0 flow_id=2 protection=1 twt_channel=3"):
raise Exception("TWT_SETUP failed")
if "OK" not in dev[0].request("TWT_TEARDOWN flags=255"):
raise Exception("TWT_SETUP failed")