From ea7526bfb3db410fb5266ba8963d926bee3d5854 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 14 Mar 2014 16:48:13 +0200 Subject: [PATCH] tests: Verify VHT20 with center freq seq0 set to zero 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 --- tests/hwsim/test_ap_vht.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index 48f67a185..2df003f9b 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -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'])