From: Ilan Peer Date: Wed, 4 Feb 2015 09:30:24 +0000 (-0500) Subject: tests: Add option to specify ifname to get_bss() X-Git-Tag: hostap_2_4~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb9cf82eb3d170b2fc01168ef526d8146a80dd38;p=thirdparty%2Fhostap.git tests: Add option to specify ifname to get_bss() 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 --- diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index b8d153fcb..0ee653b82 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()