aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-02-05 15:51:24 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-05 15:51:24 (GMT)
commitc599ddd1246f56dd5bb05cf4eb62237b74cca9a7 (patch)
tree6a950dd4a878023c1d9be560caf9655fb5f9c749
parentcb22e3b25041d1ac605dceda53e3932565e87f47 (diff)
downloadhostap-c599ddd1246f56dd5bb05cf4eb62237b74cca9a7.zip
hostap-c599ddd1246f56dd5bb05cf4eb62237b74cca9a7.tar.gz
hostap-c599ddd1246f56dd5bb05cf4eb62237b74cca9a7.tar.bz2
tests: Allow fallback to 20 MHz in ap_ht40_5ghz_invalid_pair
This test case for enforcing that AP setup fails in case there is need to fall back to 20 MHz channel due to invalid 40 MHz configuration. Modify this to allow successful AP startup as long as 40 MHz channel does not get enabled. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_ap_ht.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py
index 001e722..c33cb1a 100644
--- a/tests/hwsim/test_ap_ht.py
+++ b/tests/hwsim/test_ap_ht.py
@@ -1123,8 +1123,12 @@ def test_ap_ht40_5ghz_invalid_pair(dev, apdev):
"country_code": "US",
"ht_capab": "[HT40+]"}
hapd = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
- ev = hapd.wait_event(["AP-DISABLED"], timeout=10)
+ ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10)
if not ev:
raise Exception("AP setup failure timed out")
+ if "AP-ENABLED" in ev:
+ sec = hapd.get_status_field("secondary_channel")
+ if sec != "0":
+ raise Exception("Invalid 40 MHz channel accepted")
finally:
subprocess.call(['iw', 'reg', 'set', '00'])