[PATCH 07/14] tests: Autonomous GO force different channel than BSS

Ilan Peer ilan.peer at intel.com
Tue Jun 10 13:50:35 EDT 2014


From: Haim Dreyfuss <haim.dreyfuss at intel.com>

After bss is connected on a specific channel, create autonomous GO
with forced different channel.

Requires MCC.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss at intel.com>
---
 tests/hwsim/test_p2p_channel.py |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
index ceb815d..e6187e2 100644
--- a/tests/hwsim/test_p2p_channel.py
+++ b/tests/hwsim/test_p2p_channel.py
@@ -290,3 +290,23 @@ def test_go_neg_with_bss_on_disallowed_chan(dev, apdev):
         test_connectivity(dev[0].ifname, apdev[0]['ifname'])
     finally:
         dev[0].request("P2P_SET disallow_freq ")
+
+def test_autogo_force_diff_channel(dev, apdev):
+	"""P2P autonomous GO and bss operate on different channels"""
+	if dev[0].get_mcc() < 2:
+           logger.info("Skiping test because the driver doesn't support MCC")
+	   return "skip"
+
+        dev[0].request("SET p2p_no_group_iface 0")
+
+	hostapd.add_ap(apdev[0]['ifname'], {"ssid" : 'ap-test', "channel" : '1'})
+	dev[0].connect("ap-test", key_mgmt = "NONE", scan_freq = "2412")
+	channels = { 2 : 2417, 5 : 2432, 9 : 2452}
+	for key in channels:
+		res_go = autogo(dev[0], channels[key])
+		test_connectivity(dev[0].ifname, apdev[0]['ifname'])
+		if int(res_go['freq']) == 2412:
+			raise Exception("Group operation channel is: 2412 "
+					"excepted: " + res_go['freq'])
+			break
+		dev[0].remove_group(res_go['ifname'])
-- 
1.7.10.4



More information about the HostAP mailing list