diff mbox

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

Message ID 1460007495-17921-6-git-send-email-janusz.dziedzic@tieto.com
State Accepted
Headers show

Commit Message

Janusz.Dziedzic@tieto.com April 7, 2016, 5:38 a.m. UTC
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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

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: