From 97403b7fef8f6eef9e292b81345f3f2f755b9690 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 14 Jan 2024 21:00:14 +0200 Subject: [PATCH] tests: Longer association comeback time Verify functionality with 10000 TU comeback time in addition to the hostapd default of 1000 TU. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_pmf.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py index d683cf245..20ad4ce06 100644 --- a/tests/hwsim/test_ap_pmf.py +++ b/tests/hwsim/test_ap_pmf.py @@ -236,10 +236,19 @@ def test_ap_pmf_negative(dev, apdev): @remote_compatible def test_ap_pmf_assoc_comeback(dev, apdev): """WPA2-PSK AP with PMF association comeback""" + run_ap_pmf_assoc_comeback(dev, apdev) + +def test_ap_pmf_assoc_comeback_10000tu(dev, apdev): + """WPA2-PSK AP with PMF association comeback (10000 TUs)""" + run_ap_pmf_assoc_comeback(dev, apdev, comeback=10000) + +def run_ap_pmf_assoc_comeback(dev, apdev, comeback=None): ssid = "assoc-comeback" params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678") params["wpa_key_mgmt"] = "WPA-PSK-SHA256" params["ieee80211w"] = "2" + if comeback is not None: + params["assoc_sa_query_max_timeout"] = str(comeback) hapd = hostapd.add_ap(apdev[0], params) Wlantest.setup(hapd) wt = Wlantest() @@ -257,7 +266,7 @@ def test_ap_pmf_assoc_comeback(dev, apdev): raise Exception("Deauthentication frame RX not reported") hapd.set("ext_mgmt_frame_handling", "0") dev[0].request("REASSOCIATE") - dev[0].wait_connected(timeout=10, error="Timeout on re-connection") + dev[0].wait_connected(timeout=20, error="Timeout on re-connection") hapd.wait_4way_hs() if wt.get_sta_counter("assocresp_comeback", apdev[0]['bssid'], dev[0].p2p_interface_addr()) < 1: