[PATCH 12/14] tests: Frequency set as no GO
Ilan Peer
ilan.peer
Tue Jun 10 10:50:40 PDT 2014
From: Avraham Stern <avraham.stern at intel.com>
Verify that when setting frequency as no_go_freq and setting up
autonomous GO, the GO is instantiated on a different frequency, but
when forming a P2P group and becoming a client this frequency can be
used.
Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
tests/hwsim/test_p2p_channel.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
index 1d18382..7651f1d 100644
--- a/tests/hwsim/test_p2p_channel.py
+++ b/tests/hwsim/test_p2p_channel.py
@@ -399,3 +399,30 @@ def test_go_pref_chan_bss_on_disallowed_chan(dev, apdev):
finally:
dev[0].request("P2P_SET disallow_freq ")
dev[0].request("SET p2p_pref_chan ")
+
+def test_no_go_freq(dev, apdev):
+ """P2P channel selection: no go freq"""
+ try:
+ dev[0].request("SET p2p_no_go_freq 2412")
+ #dev[0] as client, channel 1 is ok
+ [i_res, r_res] = go_neg_pbc(i_dev=dev[0], i_intent=1,
+ r_dev=dev[1], r_intent=14, r_freq=2412)
+ check_grpform_results(i_res, r_res)
+ if i_res['freq'] != "2412":
+ raise Exception("P2P group not formed on forced freq")
+
+ dev[1].remove_group(r_res['ifname'])
+ fail = None
+ #dev[0] as GO, channel 1 is not allowed
+ try:
+ dev[0].request("SET p2p_no_go_freq 2412")
+ [i_res2, r_res2] = go_neg_pbc(i_dev=dev[0], i_intent=14,
+ r_dev=dev[1], r_intent=1, r_freq=2412)
+ check_grpform_results(i_res2, r_res2)
+ fail = "true"
+ except:
+ pass
+ if fail != None:
+ raise Exception("GO set on a disallowed freq")
+ finally:
+ dev[0].request("SET p2p_no_go_freq ")
--
1.7.10.4
More information about the Hostap
mailing list