[PATCH 6/7] tests: Ensure chan_switch tests receive a beacon after switch
Benjamin Berg
benjamin at sipsolutions.net
Thu Jul 31 06:57:02 PDT 2025
From: Benjamin Berg <benjamin.berg at intel.com>
mac80211 might disconnect if the beacon is incorrect after the channel
switch due to a misconfiguration of the GO. This would happen in the
test as HT is not explicitly selected and was disabled after the switch.
The only reason the test passed was because the traffic check would
usually happen fast enough so that mac80211 had not yet processed the
first beacon.
Add a delay and a second check to ensure this error will be caught in
the future.
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
Reviewed-by: Ilan Peer <ilan.peer at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
tests/hwsim/test_p2p_autogo.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py
index 744c41466f..394cefb572 100644
--- a/tests/hwsim/test_p2p_autogo.py
+++ b/tests/hwsim/test_p2p_autogo.py
@@ -383,6 +383,10 @@ def run_autogo_chan_switch(dev):
time.sleep(0.1)
hwsim_utils.test_connectivity_p2p(dev[0], dev[1])
+ # Wait a bit longer as the kernel might disconnect on a malformed beacon
+ time.sleep(0.5)
+ hwsim_utils.test_connectivity_p2p(dev[0], dev[1])
+
dev[0].remove_group()
dev[1].wait_go_ending_session()
--
2.50.1
More information about the Hostap
mailing list