From patchwork Thu Apr 7 10:31:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 607299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qgbX51yB8z9t0t for ; Thu, 7 Apr 2016 18:35:49 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao5Pj-0003Nm-Qz; Thu, 07 Apr 2016 08:35:43 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao5Pa-00039u-QR for hostap@lists.infradead.org; Thu, 07 Apr 2016 08:35:36 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 07 Apr 2016 01:35:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,448,1455004800"; d="scan'208";a="80728379" Received: from unknown (HELO JED00377.ger.corp.intel.com) ([10.12.217.192]) by fmsmga004.fm.intel.com with ESMTP; 07 Apr 2016 01:35:17 -0700 From: Ilan Peer To: hostap@lists.infradead.org Subject: [PATCH 05/15] tests: Add P2P Device support Date: Thu, 7 Apr 2016 13:31:59 +0300 Message-Id: <1460025129-18399-5-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460025129-18399-1-git-send-email-ilan.peer@intel.com> References: <1460025129-18399-1-git-send-email-ilan.peer@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160407_013535_026150_B5F23C4E X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.9 (-------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-7.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [192.55.52.115 listed in wl.mailspike.net] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Avraham Stern MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Avraham Stern Add an attribute to class WpaSupplicant with the name of the P2P Device interface. If a separate interface is not used for P2P Device, this attribute will hold the name of the only used interface (with functions also as the P2P Device management interface). This attribute will be used to direct P2P related commands to the P2P Device interface, which is needed for configurations that use a separate interface for the P2P Device. Signed-off-by: Avraham Stern --- tests/hwsim/wpasupplicant.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index bc865b8..b500287 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -25,6 +25,8 @@ class WpaSupplicant: self.host = remotehost.Host(hostname, ifname) if ifname: self.set_ifname(ifname, hostname, port) + res = self.get_driver_status() + self.p2p_dev_ifname = 'p2p-dev-' + self.ifname if (int(res['capa.flags'], 0) & 0x20000000) else ifname else: self.ifname = None @@ -129,6 +131,8 @@ class WpaSupplicant: if not create and set_ifname: port = self.get_ctrl_iface_port(ifname) self.set_ifname(ifname, self.hostname, port) + res = self.get_driver_status() + self.p2p_dev_ifname = 'p2p-dev-' + self.ifname if (int(res['capa.flags'], 0) & 0x20000000) else ifname def interface_remove(self, ifname): self.remove_ifname()