tests: Avoid race condition in ap_no_auth_ack

Avoid race condition with TX status reporting for the broadcast
Deauthentication frame. This could be delivered after the SET command
for ext_mgmt_frame_handled=1 and as such, could result in an
MGMT-TX-STATUS event that would confuse the next step in the test.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2023-12-10 16:32:35 +02:00
parent 4c4ba77e65
commit e7d06b508f

View file

@ -966,6 +966,11 @@ def test_ap_no_auth_ack(dev, apdev):
hapd = hostapd.add_ap(apdev[0], {"ssid": "open",
"ap_max_inactivity": "1"})
hapd.set("ext_mgmt_frame_handling", "1")
# Avoid race condition with TX status reporting for the broadcast
# Deauthentication frame.
hapd.wait_event(["MGMT-TX-STATUS"], timeout=0.1)
bssid = hapd.own_addr()
addr = "02:01:02:03:04:05"
frame = "b0003a01" + bssid.replace(':', '') + addr.replace(':', '') + bssid.replace(':', '') + "1000" + "000001000000"