aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-05-28 19:28:14 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-28 19:47:31 (GMT)
commit42083295282be30639b31494b15fd2a5fca82270 (patch)
tree507af5ecf0f0fcd66aca1a304e95aa7af44291f2 /tests
parent8e909fa92e59c9a4bc0472603decb8a334f7808a (diff)
downloadhostap-42083295282be30639b31494b15fd2a5fca82270.zip
hostap-42083295282be30639b31494b15fd2a5fca82270.tar.gz
hostap-42083295282be30639b31494b15fd2a5fca82270.tar.bz2
tests: Scan with SET freq_list and scan_cur_freq
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_scan.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py
index 00064c8..2e3b839 100644
--- a/tests/hwsim/test_scan.py
+++ b/tests/hwsim/test_scan.py
@@ -1091,3 +1091,23 @@ def test_scan_fail(dev, apdev):
raise Exception("Did not see scan failure event")
wpas.request("SET preassoc_mac_addr 0")
wpas.dump_monitor()
+
+def test_scan_freq_list(dev, apdev):
+ """Scan with SET freq_list and scan_cur_freq"""
+ try:
+ if "OK" not in dev[0].request("SET freq_list 2412 2417"):
+ raise Exception("SET freq_list failed")
+ check_scan(dev[0], "use_id=1")
+ finally:
+ dev[0].request("SET freq_list ")
+
+ hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
+ dev[0].connect("test-scan", key_mgmt="NONE", scan_freq="2412")
+ try:
+ if "OK" not in dev[0].request("SET scan_cur_freq 1"):
+ raise Exception("SET scan_cur_freq failed")
+ check_scan(dev[0], "use_id=1")
+ finally:
+ dev[0].request("SET scan_cur_freq 0")
+ dev[0].request("REMOVE_NETWORK all")
+ dev[0].wait_disconnected()