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 <janusz.dziedzic@tieto.com>
This commit is contained in:
Janusz Dziedzic 2016-04-07 07:38:07 +02:00 committed by Jouni Malinen
parent 3b3e26875a
commit c8ef2f6ef4

View 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()