aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:05 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 16:25:06 (GMT)
commitb29c46beb92df6d58113de95aaaa16374a05d590 (patch)
tree54c2cea5105cdf03cf03131c6bd7962c5fb3793f /tests
parent01703a9f2f9c662f8ad000b6476286a475431ad8 (diff)
downloadhostap-b29c46beb92df6d58113de95aaaa16374a05d590.zip
hostap-b29c46beb92df6d58113de95aaaa16374a05d590.tar.gz
hostap-b29c46beb92df6d58113de95aaaa16374a05d590.tar.bz2
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_dfs.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/hwsim/test_dfs.py b/tests/hwsim/test_dfs.py
index 49b0611..9bf6e54 100644
--- a/tests/hwsim/test_dfs.py
+++ b/tests/hwsim/test_dfs.py
@@ -30,13 +30,7 @@ def start_dfs_ap(ap, allow_failure=False, ssid="dfs", ht=True, ht40=False,
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")