Browse Source

tests: Return hapd when add_bss() and add_iface() are used

Return hapd from add_bss() and add_iface() while we can next use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic 9 years ago
parent
commit
fb1a7dccbf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tests/hwsim/hostapd.py

+ 2 - 0
tests/hwsim/hostapd.py

@@ -412,6 +412,7 @@ def add_bss(apdev, ifname, confname, ignore_error=False):
     hapd = Hostapd(ifname, hostname=hostname, port=port)
     if not hapd.ping():
         raise Exception("Could not ping hostapd")
+    return hapd
 
 def add_iface(apdev, confname):
     ifname = apdev['ifname']
@@ -429,6 +430,7 @@ def add_iface(apdev, confname):
     hapd = Hostapd(ifname, hostname=hostname, port=port)
     if not hapd.ping():
         raise Exception("Could not ping hostapd")
+    return hapd
 
 def remove_bss(apdev, ifname=None):
     if ifname == None: