diff options
author | Avraham Stern <avraham.stern@intel.com> | 2016-04-07 10:31:59 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2016-04-24 20:24:06 (GMT) |
commit | afb2e8b8913f131e5fb3a1031aacae3ab2b91287 (patch) | |
tree | cb3ef9e0770ea645252406b3c830f7fe87fb74cb | |
parent | d43fc7c6b0232693e84f4b7ccd3665f90afb87c1 (diff) | |
download | hostap-afb2e8b8913f131e5fb3a1031aacae3ab2b91287.zip hostap-afb2e8b8913f131e5fb3a1031aacae3ab2b91287.tar.gz hostap-afb2e8b8913f131e5fb3a1031aacae3ab2b91287.tar.bz2 |
tests: Store P2P Device ifname in class WpaSupplicant
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@intel.com>
-rw-r--r-- | tests/hwsim/wpasupplicant.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index b164fe0..f496724 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -25,6 +25,11 @@ class WpaSupplicant: self.host = remotehost.Host(hostname, ifname) if ifname: self.set_ifname(ifname, hostname, port) + res = self.get_driver_status() + if int(res['capa.flags'], 0) & 0x20000000: + self.p2p_dev_ifname = 'p2p-dev-' + self.ifname + else: + self.p2p_dev_ifname = ifname else: self.ifname = None @@ -129,6 +134,11 @@ 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() + if int(res['capa.flags'], 0) & 0x20000000: + self.p2p_dev_ifname = 'p2p-dev-' + self.ifname + else: + self.p2p_dev_ifname = ifname def interface_remove(self, ifname): self.remove_ifname() |