]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix sporadic failures in p2p_channel_avoid3
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 21 Jan 2021 15:40:36 +0000 (17:40 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2021 10:09:30 +0000 (12:09 +0200)
The P2P group may be originally formed on UNII-3, so disabling UNII-1
and UNII-2 will not result in a channel switch failing the test.
Fix this by setting 44 as a preferred channel.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
tests/hwsim/test_p2p_channel.py

index 7bbc958b9f81518f8f320bd14629f8d9c528d4a7..8923ca17c2741afc768ea7ff2798de664511018b 100644 (file)
@@ -226,6 +226,7 @@ def test_p2p_channel_avoid2(dev):
 def test_p2p_channel_avoid3(dev):
     """P2P and avoid frequencies driver event on 5 GHz"""
     try:
+        dev[0].global_request("SET p2p_pref_chan 128:44")
         set_country("CN", dev[0])
         form(dev[0], dev[1])
         set_country("CN", dev[0])
@@ -251,6 +252,7 @@ def test_p2p_channel_avoid3(dev):
     finally:
         set_country("00")
         dev[0].request("DRIVER_EVENT AVOID_FREQUENCIES")
+        dev[0].global_request("SET p2p_pref_chan ")
         dev[1].flush_scan_cache()
 
 @remote_compatible