[PATCH 12/24] tests: Add option to specify ifname to get_bss
Ilan Peer
ilan.peer
Wed Feb 4 01:30:24 PST 2015
This is needed for cases that the group interface differs
from the main interface, i.e., when a dedicated P2P
Device interface is used.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
tests/hwsim/wpasupplicant.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index b8d153f..0ee653b 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -946,8 +946,14 @@ class WpaSupplicant:
return None
return res.split(' ')
- def get_bss(self, bssid):
- res = self.request("BSS " + bssid)
+ def get_bss(self, bssid, ifname=None):
+ if not ifname or ifname == self.ifname:
+ res = self.request("BSS " + bssid)
+ elif ifname == self.group_ifname:
+ res = self.group_request("BSS " + bssid)
+ else:
+ return None
+
if "FAIL" in res:
return None
lines = res.splitlines()
--
1.8.3.2
More information about the Hostap
mailing list