]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Move vht_supported() into utils.py
authorJouni Malinen <j@w1.fi>
Sat, 18 Apr 2020 08:09:36 +0000 (11:09 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 Apr 2020 08:35:32 +0000 (11:35 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_tdls.py
tests/hwsim/test_ap_vht.py
tests/hwsim/test_rrm.py
tests/hwsim/utils.py

index de2f02ac10eb0be468e01e3695297300d3f6eb5f..05c4ca3e48b12382a07287ab2181eff00b02a7f7 100644 (file)
@@ -16,7 +16,6 @@ from hostapd import Hostapd
 import hostapd
 from utils import *
 from wlantest import Wlantest
-from test_ap_vht import vht_supported
 
 def start_ap_wpa2_psk(ap):
     params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
index c7851d5571f79cd3d916bd5d7383f4cf617bf9ad..338e8c806f66b0e30f9564af4560a354548b59ff 100644 (file)
@@ -18,13 +18,6 @@ from test_dfs import wait_dfs_event
 from test_ap_csa import csa_supported
 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):
     """VHT with 80 MHz channel width"""
     try:
index dde98932b6a6c80ded8d4dda4247c82a099d3f39..425edb20effb935122b969052ffc5e00e9b64a89 100644 (file)
@@ -16,11 +16,9 @@ import time
 
 import hostapd
 from wpasupplicant import WpaSupplicant
-from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
-from utils import disable_hapd, clear_regdom_dev, clear_regdom
+from utils import *
 from test_ap_ht import clear_scan_cache
 from remotehost import remote_compatible
-from test_ap_vht import vht_supported
 
 def check_rrm_support(dev):
     rrm = int(dev.get_driver_status_field("capa.rrm_flags"), 16)
index 7f50ab25e6f94b26daf38b1321feef6b5b2f6501..57b570c2eb8447632c01543455ac7181f6a521e2 100644 (file)
@@ -112,6 +112,13 @@ def check_sae_capab(dev):
     if "SAE" not in dev.get_capability("auth_alg"):
         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):
     phy = "phy3"
     try: