From ec36fff79fbb76ee5f26e879bce78ff7a87746a2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 29 Mar 2014 16:28:00 +0200 Subject: [PATCH] tests: HT OLBC detection on 5 GHz Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_ht.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 14107579d..b0d444094 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -376,6 +376,33 @@ def test_olbc(dev, apdev): if status['olbc'] != '1' or status['olbc_ht'] != '1': raise Exception("Missing OLBC information") +def test_olbc_5ghz(dev, apdev): + """OLBC detection on 5 GHz""" + try: + params = { "ssid": "test-olbc", + "country_code": "FI", + "hw_mode": "a", + "channel": "36", + "ht_capab": "[HT40+]" } + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + status = hapd.get_status() + if status['olbc'] != '0' or status['olbc_ht'] != '0': + raise Exception("Unexpected OLBC information") + + params = { "ssid": "olbc-ap", + "country_code": "FI", + "hw_mode": "a", + "channel": "36", + "ieee80211n": "0", + "wmm_enabled": "0" } + hostapd.add_ap(apdev[1]['ifname'], params) + time.sleep(0.5) + status = hapd.get_status() + if status['olbc_ht'] != '1': + raise Exception("Missing OLBC information") + finally: + subprocess.call(['sudo', 'iw', 'reg', 'set', '00']) + def test_ap_require_ht(dev, apdev): """Require HT""" params = { "ssid": "require-ht",