]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Subset of VHT functionality on 2.4 GHz
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 16 Dec 2014 14:07:54 +0000 (16:07 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 13 Jan 2015 23:12:56 +0000 (01:12 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_vht.py

index e59ec2e3362e08c8c34b9921c078c8aaa8dfc068..72f0ee876cb423232ec3940f30105819c1330e40 100644 (file)
@@ -410,3 +410,32 @@ def test_ap_vht80_csa(dev, apdev):
             hapd.request("DISABLE")
         subprocess.call(['sudo', 'iw', 'reg', 'set', '00'])
         dev[0].flush_scan_cache()
+
+def test_ap_vht_on_24ghz(dev, apdev):
+    """Subset of VHT features on 2.4 GHz"""
+    hapd = None
+    params = { "ssid": "test-vht-2g",
+               "hw_mode": "g",
+               "channel": "1",
+               "ieee80211n": "1",
+               "vendor_vht": "1",
+               "vht_capab": "[MAX-MPDU-11454]",
+               "vht_oper_chwidth": "0",
+               "vht_oper_centr_freq_seg0_idx": "1"
+    }
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    try:
+        if "OK" not in dev[0].request("VENDOR_ELEM_ADD 13 dd1300904c0400bf0c3240820feaff0000eaff0000"):
+            raise Exception("Failed to add vendor element")
+        dev[0].connect("test-vht-2g", scan_freq="2412", key_mgmt="NONE")
+        hwsim_utils.test_connectivity(dev[0], hapd)
+        sta = hapd.get_sta(dev[0].own_addr())
+        if '[VENDOR_VHT]' not in sta['flags']:
+            raise Exception("No VENDOR_VHT STA flag")
+
+        dev[1].connect("test-vht-2g", scan_freq="2412", key_mgmt="NONE")
+        sta = hapd.get_sta(dev[1].own_addr())
+        if '[VENDOR_VHT]' in sta['flags']:
+            raise Exception("Unexpected VENDOR_VHT STA flag")
+    finally:
+        dev[0].request("VENDOR_ELEM_REMOVE 13 *")