From c8ef2f6ef429c6a2aeeda7ad96060ff85276a42e Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic Date: Thu, 7 Apr 2016 07:38:07 +0200 Subject: [PATCH] tests: Pass apdev to HostapdGlobal() in ap_add_with_driver This is needed for running the test with a remote host. Signed-off-by: Janusz Dziedzic --- tests/hwsim/test_ap_dynamic.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py index 7dab735d7..7cf055150 100644 --- a/tests/hwsim/test_ap_dynamic.py +++ b/tests/hwsim/test_ap_dynamic.py @@ -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()