[PATCH 06/15] tests: Modify persistent_group_profile_add() to support P2P Device interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Avraham Stern <avraham.stern@xxxxxxxxx>

Modify persistent_group_profile_add() test to support configurations
that use a dedicated P2P Device interface by sending the ADD_NETWORK
and SET_NETWORK commands on the global control interface and
specifying the P2P Device interface name.

Signed-off-by: Avraham Stern <avraham.stern@xxxxxxxxx>
---
 tests/hwsim/test_p2p_persistent.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/hwsim/test_p2p_persistent.py b/tests/hwsim/test_p2p_persistent.py
index 362e443..6451540 100644
--- a/tests/hwsim/test_p2p_persistent.py
+++ b/tests/hwsim/test_p2p_persistent.py
@@ -541,11 +541,13 @@ def test_persistent_group_missed_inv_resp(dev):
 def test_persistent_group_profile_add(dev):
     """Create a P2P persistent group with ADD_NETWORK"""
     passphrase="passphrase here"
-    id = dev[0].add_network()
-    dev[0].set_network_quoted(id, "ssid", "DIRECT-ab")
-    dev[0].set_network_quoted(id, "psk", passphrase)
-    dev[0].set_network(id, "mode", "3")
-    dev[0].set_network(id, "disabled", "2")
+    id = dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " ADD_NETWORK")
+    if "FAIL" in id:
+	    raise Exception("ADD_NETWORK failed")
+    dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + ' ssid "DIRECT-ab"')
+    dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + ' psk "' + passphrase + '"')
+    dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + " mode 3")
+    dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + " disabled 2")
     dev[0].p2p_start_go(persistent=id, freq=2412)
 
     pin = dev[1].wps_read_pin()
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux