import hostapd
from utils import *
-from test_ap_ht import clear_scan_cache
from test_dfs import wait_dfs_event
def force_prev_ap_on_24g(ap):
import hostapd
from wpasupplicant import WpaSupplicant
-from utils import HwsimSkip, alloc_fail, parse_ie, clear_regdom
+from utils import *
import hwsim_utils
from test_ap_csa import csa_supported
-def clear_scan_cache(apdev):
- ifname = apdev['ifname']
- hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'up'])
- hostapd.cmd_execute(apdev, ['iw', ifname, 'scan', 'trigger', 'freq', '2412',
- 'flush'])
- time.sleep(0.1)
- hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'down'])
-
-def set_world_reg(apdev0=None, apdev1=None, dev0=None):
- if apdev0:
- hostapd.cmd_execute(apdev0, ['iw', 'reg', 'set', '00'])
- if apdev1:
- hostapd.cmd_execute(apdev1, ['iw', 'reg', 'set', '00'])
- if dev0:
- dev0.cmd_execute(['iw', 'reg', 'set', '00'])
- time.sleep(0.1)
-
def test_ap_ht40_scan(dev, apdev):
"""HT40 co-ex scan"""
clear_scan_cache(apdev[0])
from utils import *
from wpasupplicant import WpaSupplicant
from wlantest import WlantestCapture
-from test_ap_ht import set_world_reg
@remote_compatible
def test_ap_open(dev, apdev):
from utils import *
from test_dfs import wait_dfs_event
from test_ap_csa import csa_supported
-from test_ap_ht import clear_scan_cache
def test_ap_vht80(dev, apdev):
"""VHT with 80 MHz channel width"""
from utils import *
from test_dfs import wait_dfs_event
from test_ap_csa import csa_supported
-from test_ap_ht import clear_scan_cache
def test_he_open(dev, apdev):
"""HE AP with open mode configuration"""
import hostapd
from wpasupplicant import WpaSupplicant
import hwsim_utils
-from utils import HwsimSkip
+from utils import *
-from test_ap_ht import set_world_reg
from test_ap_psk import parse_eapol, build_eapol, pmk_to_ptk, eapol_key_mic, recv_eapol, send_eapol, reply_eapol, build_eapol_key_3_4, aes_wrap, pad_key_data
#TODO: Refuse setting up AP with OCV but without MFP support
import hwsim_utils
import hostapd
from p2p_utils import *
-from test_ap_ht import clear_scan_cache
-from utils import HwsimSkip
+from utils import *
@remote_compatible
def test_concurrent_autogo(dev, apdev):
import hostapd
from wpasupplicant import WpaSupplicant
from utils import *
-from test_ap_ht import clear_scan_cache
from remotehost import remote_compatible
def check_rrm_support(dev):
if "[UTF-8]" not in dev[0].request("SCAN_RESULTS"):
raise Exception("[UTF-8] flag not included in SCAN_RESULTS")
-def clear_scan_cache(hapd, dev):
+def clear_scan_cache2(hapd, dev):
# clear BSS table to avoid issues in following test cases
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
ev = dev[1].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None:
raise Exception("Unexpected connection")
- clear_scan_cache(hapd, dev)
+ clear_scan_cache2(hapd, dev)
@remote_compatible
def test_ssid_hidden2(dev, apdev):
ev = dev[1].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None:
raise Exception("Unexpected connection")
- clear_scan_cache(hapd, dev)
+ clear_scan_cache2(hapd, dev)
@remote_compatible
def test_ssid_hidden_wpa2(dev, apdev):
ev = dev[1].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None:
raise Exception("Unexpected connection")
- clear_scan_cache(hapd, dev)
+ clear_scan_cache2(hapd, dev)
from wpasupplicant import WpaSupplicant
from utils import *
from tshark import run_tshark, run_tshark_json
-from test_ap_ht import set_world_reg
from test_sae import build_sae_commit, sae_rx_commit_token_req
from hwsim_utils import set_group_map
import remotehost
import logging
logger = logging.getLogger()
+import hostapd
def get_ifnames():
ifnames = []
def stop_monitor(ifname):
subprocess.call(["ip", "link", "set", "dev", ifname, "down"])
subprocess.call(["iw", ifname, "set", "type", "managed"])
+
+def clear_scan_cache(apdev):
+ ifname = apdev['ifname']
+ hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'up'])
+ hostapd.cmd_execute(apdev, ['iw', ifname, 'scan', 'trigger', 'freq', '2412',
+ 'flush'])
+ time.sleep(0.1)
+ hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'down'])
+
+def set_world_reg(apdev0=None, apdev1=None, dev0=None):
+ if apdev0:
+ hostapd.cmd_execute(apdev0, ['iw', 'reg', 'set', '00'])
+ if apdev1:
+ hostapd.cmd_execute(apdev1, ['iw', 'reg', 'set', '00'])
+ if dev0:
+ dev0.cmd_execute(['iw', 'reg', 'set', '00'])
+ time.sleep(0.1)