diff --git a/tests/hwsim/test_ap_tdls.py b/tests/hwsim/test_ap_tdls.py index de2f02ac1..05c4ca3e4 100644 --- a/tests/hwsim/test_ap_tdls.py +++ b/tests/hwsim/test_ap_tdls.py @@ -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") diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index c7851d557..338e8c806 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -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: diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py index dde98932b..425edb20e 100644 --- a/tests/hwsim/test_rrm.py +++ b/tests/hwsim/test_rrm.py @@ -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) diff --git a/tests/hwsim/utils.py b/tests/hwsim/utils.py index 7f50ab25e..57b570c2e 100644 --- a/tests/hwsim/utils.py +++ b/tests/hwsim/utils.py @@ -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: