tests: Use hostapd.add_ap() instead of HostapdGlobal() (DFS)
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>
This commit is contained in:
parent
01703a9f2f
commit
b29c46beb9
1 changed files with 1 additions and 7 deletions
|
@ -30,13 +30,7 @@ def start_dfs_ap(ap, allow_failure=False, ssid="dfs", ht=True, ht40=False,
|
||||||
channel=None):
|
channel=None):
|
||||||
ifname = ap['ifname']
|
ifname = ap['ifname']
|
||||||
logger.info("Starting AP " + ifname + " on DFS channel")
|
logger.info("Starting AP " + ifname + " on DFS channel")
|
||||||
hapd_global = hostapd.HostapdGlobal()
|
hapd = hostapd.add_ap(ap, {}, no_enable=True)
|
||||||
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.set("ssid", ssid)
|
hapd.set("ssid", ssid)
|
||||||
hapd.set("country_code", "FI")
|
hapd.set("country_code", "FI")
|
||||||
hapd.set("ieee80211d", "1")
|
hapd.set("ieee80211d", "1")
|
||||||
|
|
Loading…
Reference in a new issue