[PATCH 6/9] tests: Add CPT parameter to wpasupplicant asp_provision
Ilan Peer
ilan.peer
Thu Jul 2 06:21:24 PDT 2015
From: Max Stepanov <Max.Stepanov at intel.com>
Add an optional CPT parameter to asp_provision() method of
WpaSupplicant.
Signed-off-by: Max Stepanov <Max.Stepanov at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Reviewed-by: Ilan Peer <ilan.peer at intel.com>
---
tests/hwsim/wpasupplicant.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index 07d1481..75fa3f9 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -1102,7 +1102,7 @@ class WpaSupplicant:
vals[name] = value
return vals
- def asp_provision(self, peer, adv_id, adv_mac, session_id, session_mac, method="1000", info="", status=None):
+ def asp_provision(self, peer, adv_id, adv_mac, session_id, session_mac, method="1000", info="", status=None, cpt=None):
if status is None:
cmd = "P2P_ASP_PROVISION"
params = "info='%s' method=%s" % (info, method)
@@ -1110,6 +1110,9 @@ class WpaSupplicant:
cmd = "P2P_ASP_PROVISION_RESP"
params = "status=%d" % status
+ if cpt is not None:
+ params += " cpt=" + cpt
+
if "OK" not in self.global_request("%s %s adv_id=%s adv_mac=%s session=%d session_mac=%s %s" %
(cmd, peer, adv_id, adv_mac, session_id, session_mac, params)):
raise Exception("%s request failed" % cmd)
--
1.9.1
More information about the Hostap
mailing list