From 42083295282be30639b31494b15fd2a5fca82270 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 28 May 2016 22:28:14 +0300 Subject: [PATCH] tests: Scan with SET freq_list and scan_cur_freq Signed-off-by: Jouni Malinen --- tests/hwsim/test_scan.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index 00064c8d1..2e3b8397f 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()