]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: HT40 on 5 GHz with disabled secondary channel
authorJouni Malinen <j@w1.fi>
Sat, 26 Mar 2016 15:38:31 +0000 (17:38 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 26 Mar 2016 20:53:58 +0000 (22:53 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_ht.py

index c33cb1aea95318d9be001bcaa31bf9938a65fda7..81c39409ba8a651bdb0b095f83f1c427d2ad961a 100644 (file)
@@ -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'])