aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 17:41:24 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 20:53:58 (GMT)
commitdd73d9a8438a9c77faaf13fff20bc05c52844d6d (patch)
tree8882d09552cf6a9df7dbdcf520382e4a3cebfb3a
parent02155431030ed4cff683268d6a6f01032beca4b7 (diff)
downloadhostap-dd73d9a8438a9c77faaf13fff20bc05c52844d6d.zip
hostap-dd73d9a8438a9c77faaf13fff20bc05c52844d6d.tar.gz
hostap-dd73d9a8438a9c77faaf13fff20bc05c52844d6d.tar.bz2
tests: AP Channel Switch - invalid channel
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_ap_csa.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/hwsim/test_ap_csa.py b/tests/hwsim/test_ap_csa.py
index d8290c7..d493193 100644
--- a/tests/hwsim/test_ap_csa.py
+++ b/tests/hwsim/test_ap_csa.py
@@ -17,7 +17,7 @@ def connect(dev, apdev, **kwargs):
"channel": "1" }
params.update(kwargs)
ap = hostapd.add_ap(apdev[0]['ifname'], params)
- dev.connect("ap-csa", key_mgmt="NONE")
+ dev.connect("ap-csa", key_mgmt="NONE", scan_freq="2412")
return ap
def switch_channel(ap, count, freq):
@@ -119,3 +119,13 @@ def test_ap_csa_ecsa_only(dev, apdev):
hwsim_utils.test_connectivity(dev[0], ap)
switch_channel(ap, 10, 2462)
hwsim_utils.test_connectivity(dev[0], ap)
+
+def test_ap_csa_invalid(dev, apdev):
+ """AP Channel Switch - invalid channel"""
+ csa_supported(dev[0])
+ ap = connect(dev[0], apdev)
+
+ vals = [ 2461, 4900, 4901, 5181, 5746, 5699, 5895, 5899 ]
+ for val in vals:
+ if "FAIL" not in ap.request("CHAN_SWITCH 1 %d" % val):
+ raise Exception("Invalid channel accepted: %d" % val)