]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix p2p_channel_avoid3
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 28 Jul 2022 13:56:21 +0000 (16:56 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 28 Jul 2022 13:56:21 +0000 (16:56 +0300)
This test case assumed that the p2p_pref_chan 128:44 parameter would
have resulted in channel 44 (5220 MHz) being selected. That does not
work anymore since that channel was marked to require DFS/radar
detection in regdb. Fix the text case by changing to use another country
with rules that match the test case expectations.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_p2p_channel.py

index d57234dadb64e3df64759d9843b580b998e61de3..049d6b860d972bda036bdd800085b5be23a9d816 100644 (file)
@@ -227,13 +227,13 @@ 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])
+        set_country("CO", dev[0])
         form(dev[0], dev[1])
-        set_country("CN", dev[0])
+        set_country("CO", dev[0])
         [i_res, r_res] = invite_from_go(dev[0], dev[1], terminate=False,
                                         extra="ht40 vht")
         freq = int(i_res['freq'])
-        if freq < 5000:
+        if freq != 5220:
             raise Exception("Unexpected channel %d MHz" % freq)
 
         if "OK" not in dev[0].request("DRIVER_EVENT AVOID_FREQUENCIES 5180-5320,5500-5640"):