From 97e4688b2f5cdf489c5aa11f63172b3008ba210f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 20 Jun 2015 15:51:41 +0300 Subject: [PATCH] tests: HT40 on 5 GHz with invalid channel pair Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_ht.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 11e06e1c9..670f59ded 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -944,3 +944,19 @@ def test_prefer_ht20_during_roam(dev, apdev): if dev[0].get_status_field('bssid') != bssid2: raise Exception("Unexpected BSS selected") + +def test_ap_ht40_5ghz_invalid_pair(dev, apdev): + """HT40 on 5 GHz with invalid channel pair""" + clear_scan_cache(apdev[0]['ifname']) + try: + params = { "ssid": "test-ht40", + "hw_mode": "a", + "channel": "40", + "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) + if not ev: + raise Exception("AP setup failure timed out") + finally: + subprocess.call(['iw', 'reg', 'set', '00'])