]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: HE and TWT
authorJouni Malinen <j@w1.fi>
Sun, 7 Mar 2021 20:08:52 +0000 (22:08 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Mar 2021 20:08:52 +0000 (22:08 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_he.py

index 21c1b556bad5fcaf81c209caa635b025efa2f850..8114f339febb402d3d5d79d47ea9bb9b6083c05a 100644 (file)
@@ -1094,3 +1094,21 @@ def test_he80_to_24g_he(dev, apdev):
     finally:
         dev[0].request("DISCONNECT")
         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")