Browse Source

tests: Add CPT parameter to WpaSupplicant asp_provision()

Add an optional CPT parameter to asp_provision() method of
WpaSupplicant.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Max Stepanov 9 years ago
parent
commit
c1e31bdb7f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tests/hwsim/wpasupplicant.py

+ 4 - 1
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)