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 <ilan.peer@intel.com>
This commit is contained in:
parent
5270b2fbb7
commit
fb9cf82eb3
1 changed files with 8 additions and 2 deletions
|
@ -946,8 +946,14 @@ class WpaSupplicant:
|
||||||
return None
|
return None
|
||||||
return res.split(' ')
|
return res.split(' ')
|
||||||
|
|
||||||
def get_bss(self, bssid):
|
def get_bss(self, bssid, ifname=None):
|
||||||
res = self.request("BSS " + bssid)
|
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:
|
if "FAIL" in res:
|
||||||
return None
|
return None
|
||||||
lines = res.splitlines()
|
lines = res.splitlines()
|
||||||
|
|
Loading…
Reference in a new issue