From c1e31bdb7f1ac455df8acbcafaf566d9491b1449 Mon Sep 17 00:00:00 2001 From: Max Stepanov Date: Thu, 2 Jul 2015 16:21:24 +0300 Subject: [PATCH] tests: Add CPT parameter to WpaSupplicant asp_provision() Add an optional CPT parameter to asp_provision() method of WpaSupplicant. Signed-off-by: Max Stepanov Reviewed-by: Andrei Otcheretianski Reviewed-by: Ilan Peer --- 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 a515b83..d2e82e9 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -1106,7 +1106,7 @@ class WpaSupplicant: return vals def asp_provision(self, peer, adv_id, adv_mac, session_id, session_mac, - method="1000", info="", status=None): + method="1000", info="", status=None, cpt=None): if status is None: cmd = "P2P_ASP_PROVISION" params = "info='%s' method=%s" % (info, method) @@ -1114,6 +1114,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) -- 2.1.4