]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: P2P GO start with only 5 GHz band allowed
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 2 Mar 2015 15:00:20 +0000 (17:00 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 Mar 2015 15:01:15 +0000 (17:01 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_p2p_channel.py

index bc4cd58f7683bd0fab69ef2ba08366a9755af747..d89159a5096686ad63694712cf58a4825d658a58 100644 (file)
@@ -643,3 +643,17 @@ def test_p2p_listen_chan_optimize(dev, apdev):
         dev[0].p2p_stop_find()
     finally:
         wpas.request("SET p2p_optimize_listen_chan 0")
+
+def test_p2p_channel_5ghz_only(dev):
+    """P2P GO start with only 5 GHz band allowed"""
+    try:
+        set_country("US", dev[0])
+        dev[0].request("P2P_SET disallow_freq 2400-2500")
+        res = autogo(dev[0])
+        freq = int(res['freq'])
+        if freq < 5000:
+            raise Exception("Unexpected channel %d MHz" % freq)
+        dev[0].remove_group()
+    finally:
+        set_country("00")
+        dev[0].request("P2P_SET disallow_freq ")