This makes the DFS test cases that use start_dfs_ap() more usable for
testing with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
channel=None):
ifname = ap['ifname']
logger.info("Starting AP " + ifname + " on DFS channel")
- hapd_global = hostapd.HostapdGlobal()
- hapd_global.remove(ifname)
- hapd_global.add(ifname)
- hapd = hostapd.Hostapd(ifname)
- if not hapd.ping():
- raise Exception("Could not ping hostapd")
- hapd.set_defaults()
+ hapd = hostapd.add_ap(ap, {}, no_enable=True)
hapd.set("ssid", ssid)
hapd.set("country_code", "FI")
hapd.set("ieee80211d", "1")