tests: Move vht_supported() into utils.py
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
31bdd8b7c7
commit
1bba048d78
4 changed files with 8 additions and 11 deletions
|
@ -16,7 +16,6 @@ from hostapd import Hostapd
|
||||||
import hostapd
|
import hostapd
|
||||||
from utils import *
|
from utils import *
|
||||||
from wlantest import Wlantest
|
from wlantest import Wlantest
|
||||||
from test_ap_vht import vht_supported
|
|
||||||
|
|
||||||
def start_ap_wpa2_psk(ap):
|
def start_ap_wpa2_psk(ap):
|
||||||
params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
|
params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
|
||||||
|
|
|
@ -18,13 +18,6 @@ from test_dfs import wait_dfs_event
|
||||||
from test_ap_csa import csa_supported
|
from test_ap_csa import csa_supported
|
||||||
from test_ap_ht import clear_scan_cache
|
from test_ap_ht import clear_scan_cache
|
||||||
|
|
||||||
def vht_supported():
|
|
||||||
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
|
||||||
reg = cmd.stdout.read()
|
|
||||||
if "@ 80)" in reg or "@ 160)" in reg:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def test_ap_vht80(dev, apdev):
|
def test_ap_vht80(dev, apdev):
|
||||||
"""VHT with 80 MHz channel width"""
|
"""VHT with 80 MHz channel width"""
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -16,11 +16,9 @@ import time
|
||||||
|
|
||||||
import hostapd
|
import hostapd
|
||||||
from wpasupplicant import WpaSupplicant
|
from wpasupplicant import WpaSupplicant
|
||||||
from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
|
from utils import *
|
||||||
from utils import disable_hapd, clear_regdom_dev, clear_regdom
|
|
||||||
from test_ap_ht import clear_scan_cache
|
from test_ap_ht import clear_scan_cache
|
||||||
from remotehost import remote_compatible
|
from remotehost import remote_compatible
|
||||||
from test_ap_vht import vht_supported
|
|
||||||
|
|
||||||
def check_rrm_support(dev):
|
def check_rrm_support(dev):
|
||||||
rrm = int(dev.get_driver_status_field("capa.rrm_flags"), 16)
|
rrm = int(dev.get_driver_status_field("capa.rrm_flags"), 16)
|
||||||
|
|
|
@ -112,6 +112,13 @@ def check_sae_capab(dev):
|
||||||
if "SAE" not in dev.get_capability("auth_alg"):
|
if "SAE" not in dev.get_capability("auth_alg"):
|
||||||
raise HwsimSkip("SAE not supported")
|
raise HwsimSkip("SAE not supported")
|
||||||
|
|
||||||
|
def vht_supported():
|
||||||
|
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
||||||
|
reg = cmd.stdout.read()
|
||||||
|
if "@ 80)" in reg or "@ 160)" in reg:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def get_phy(ap, ifname=None):
|
def get_phy(ap, ifname=None):
|
||||||
phy = "phy3"
|
phy = "phy3"
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue