]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: P2P group formation using P2PS method without specifying PIN
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 20 May 2016 20:37:51 +0000 (23:37 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 20 May 2016 20:37:51 +0000 (23:37 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_p2ps.py
tests/hwsim/wpasupplicant.py

index ad2382ce1d8d4a664cc14b1b1963213480ab28c6..e71b6a53c1b857a5848255bc60964dfe514081fa 100644 (file)
@@ -1531,3 +1531,16 @@ def run_p2ps_connect_p2p_device2(dev, no_group_iface):
         if ev0 is None:
             raise Exception("Unable to remove the advertisement instance")
         remove_group(wpas, dev[0])
+
+def test_p2ps_connect_p2ps_method_no_pin(dev):
+    """P2P group formation using P2PS method without specifying PIN"""
+    dev[0].p2p_listen()
+    dev[1].p2p_go_neg_auth(dev[0].p2p_dev_addr(), None, "p2ps", go_intent=15)
+    dev[1].p2p_listen()
+    i_res = dev[0].p2p_go_neg_init(dev[1].p2p_dev_addr(), None, "p2ps",
+                                   timeout=20, go_intent=0)
+    r_res = dev[1].p2p_go_neg_auth_result()
+    logger.debug("i_res: " + str(i_res))
+    logger.debug("r_res: " + str(r_res))
+    check_grpform_results(i_res, r_res)
+    remove_group(dev[0], dev[1])
index f26124d245d3b2091b504200bb06f90d14450cad..77c84f8b6e0a25235b2e7f2db21d2c2458bc2c9e 100644 (file)
@@ -669,7 +669,7 @@ class WpaSupplicant:
             cmd = "P2P_CONNECT " + peer + " " + pin + " " + method
         else:
             cmd = "P2P_CONNECT " + peer + " " + method
-        if go_intent:
+        if go_intent is not None:
             cmd = cmd + ' go_intent=' + str(go_intent)
         if freq:
             cmd = cmd + ' freq=' + str(freq)