aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 15:38:31 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 20:53:58 (GMT)
commitebd80f2d2e12332bc7dac727d785bd85c411f7bc (patch)
treecdb39c9701e6bbc06c92820696d1009241a5352d
parent07a1e904874a5c7e53273e5093265746516ef84f (diff)
downloadhostap-ebd80f2d2e12332bc7dac727d785bd85c411f7bc.zip
hostap-ebd80f2d2e12332bc7dac727d785bd85c411f7bc.tar.gz
hostap-ebd80f2d2e12332bc7dac727d785bd85c411f7bc.tar.bz2
tests: HT40 on 5 GHz with disabled secondary channel
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_ap_ht.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py
index c33cb1a..81c3940 100644
--- a/tests/hwsim/test_ap_ht.py
+++ b/tests/hwsim/test_ap_ht.py
@@ -1132,3 +1132,23 @@ def test_ap_ht40_5ghz_invalid_pair(dev, apdev):
raise Exception("Invalid 40 MHz channel accepted")
finally:
subprocess.call(['iw', 'reg', 'set', '00'])
+
+def test_ap_ht40_5ghz_disabled_sec(dev, apdev):
+ """HT40 on 5 GHz with disabled secondary channel"""
+ clear_scan_cache(apdev[0]['ifname'])
+ try:
+ params = { "ssid": "test-ht40",
+ "hw_mode": "a",
+ "channel": "48",
+ "country_code": "US",
+ "ht_capab": "[HT40+]"}
+ hapd = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
+ 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'])