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")