[PATCH v2 02/17] tests: pass apdev to hostapd.terminate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pass apdev dictionary to hostapd.terminate()

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@xxxxxxxxx>
---
 tests/hwsim/hostapd.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py
index 6becb8e..931c666 100644
--- a/tests/hwsim/hostapd.py
+++ b/tests/hwsim/hostapd.py
@@ -422,8 +422,15 @@ def remove_bss(apdev, ifname=None):
     hapd_global = HostapdGlobal(hostname=hostname, port=port)
     hapd_global.remove(ifname)
 
-def terminate(hostname=None, port=8878):
-    logger.info("Terminating hostapd")
+def terminate(apdev):
+    try:
+        hostname = apdev['hostname']
+        port = apdev['port']
+        logger.info("Terminating hostapd " + apdev['hostname'] + "/" + apdev['port'])
+    except:
+        hostname = None
+        port = 8878
+        logger.info("Terminating hostapd")
     hapd_global = HostapdGlobal(hostname=hostname, port=port)
     hapd_global.terminate()
 
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux