]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Pass apdev to HostapdGlobal() in ap_add_with_driver
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 17:16:29 +0000 (20:16 +0300)
This is needed for running the test with a remote host.

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

index 7dab735d7f10be20509a27899147388fa68ee1ad..7cf05515001fe3c4c9ed12d8b8a3402fe3792215 100644 (file)
@@ -443,9 +443,14 @@ def test_ap_multi_bss(dev, apdev):
 def test_ap_add_with_driver(dev, apdev):
     """Add hostapd interface with driver specified"""
     ifname = apdev[0]['ifname']
-    hapd_global = hostapd.HostapdGlobal()
+    try:
+       hostname = apdev[0]['hostname']
+    except:
+       hostname = None
+    hapd_global = hostapd.HostapdGlobal(apdev[0])
     hapd_global.add(ifname, driver="nl80211")
-    hapd = hostapd.Hostapd(ifname)
+    port = hapd_global.get_ctrl_iface_port(ifname)
+    hapd = hostapd.Hostapd(ifname, hostname, port)
     hapd.set_defaults()
     hapd.set("ssid", "dynamic")
     hapd.enable()