Return hapd from add_bss() and add_iface() while we can next use it.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
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']
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: