[PATCH 6/7] tests: Ensure chan_switch tests receive a beacon after switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Benjamin Berg <benjamin.berg@xxxxxxxxx>

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@xxxxxxxxx>
Reviewed-by: Ilan Peer <ilan.peer@xxxxxxxxx>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@xxxxxxxxx>
---
 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


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux