]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify VHT20 with center freq seq0 set to zero
authorJohannes Berg <johannes.berg@intel.com>
Fri, 14 Mar 2014 14:48:13 +0000 (16:48 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 14 Mar 2014 15:07:18 +0000 (17:07 +0200)
This was found through a mac80211 bug which didn't correctly accept a
center segment 0 value of zero, so the test will fail until the mac80211
bug is fixed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/test_ap_vht.py

index 48f67a185a6a5287a3656e35ad8e10e474fa641c..2df003f9b5a4a2d08247c13c455b6a07d7a65ba6 100644 (file)
@@ -1,12 +1,13 @@
 # Test cases for VHT operations with hostapd
 # Copyright (c) 2014, Qualcomm Atheros, Inc.
+# Copyright (c) 2013, Intel Corporation
 #
 # This software may be distributed under the terms of the BSD license.
 # See README for more details.
 
 import logging
 logger = logging.getLogger()
-import subprocess
+import subprocess, time
 
 import hwsim_utils
 import hostapd
@@ -69,3 +70,25 @@ def test_ap_vht80_params(dev, apdev):
         raise
     finally:
         subprocess.call(['sudo', 'iw', 'reg', 'set', '00'])
+
+def test_ap_vht_20(devs, apdevs):
+    dev = devs[0]
+    ap = apdevs[0]
+    try:
+        params = { "ssid": "test-vht20",
+                   "country_code": "DE",
+                   "hw_mode": "a",
+                   "channel": "36",
+                   "ieee80211n": "1",
+                   "ieee80211ac": "1",
+                   "ht_capab": "",
+                   "vht_capab": "",
+                   "vht_oper_chwidth": "0",
+                   "vht_oper_centr_freq_seg0_idx": "0",
+                   "require_vht": "1",
+                 }
+        hostapd.add_ap(ap['ifname'], params)
+        dev.connect("test-vht20", scan_freq="5180", key_mgmt="NONE")
+        hwsim_utils.test_connectivity(dev.ifname, ap['ifname'])
+    finally:
+        subprocess.call(['sudo', 'iw', 'reg', 'set', '00'])