]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Return hapd when add_bss() and add_iface() are used
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Thu, 7 Apr 2016 05:38:04 +0000 (07:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 13:18:50 +0000 (16:18 +0300)
Return hapd from add_bss() and add_iface() while we can next use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
tests/hwsim/hostapd.py

index 6c6cba6a572bc66206733b2d8a3c441c34bfef0d..a6d4cad7cd87148958375423a6c54598086b0e44 100644 (file)
@@ -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: