[PATCH 05/15] tests: Add P2P Device support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Avraham Stern <avraham.stern@xxxxxxxxx>

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 <avraham.stern@xxxxxxxxx>
---
 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()
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux