[PATCH v2 06/17] tests: return hapd when add_bss() and add_iface()

Janusz Dziedzic janusz.dziedzic at tieto.com
Wed Apr 6 22:38:04 PDT 2016


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

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at tieto.com>
---
 tests/hwsim/hostapd.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py
index 44035b3..a7d6424 100644
--- a/tests/hwsim/hostapd.py
+++ b/tests/hwsim/hostapd.py
@@ -413,6 +413,7 @@ def add_bss(apdev, ifname, confname, phy=None, 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=None):
     if ifname == None:
@@ -431,6 +432,7 @@ def add_iface(apdev, confname, ifname=None):
     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:
-- 
1.9.1




More information about the Hostap mailing list