raise Exception("Unexpected frequency")
dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
-
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_acs_5ghz_40mhz(dev, apdev):
raise Exception("Secondary channel not set")
dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
-
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_acs_vht(dev, apdev):
raise Exception("Secondary channel not set")
dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
-
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_acs_vht40(dev, apdev):
raise Exception("Secondary channel not set")
dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
-
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_acs_vht160(dev, apdev):
if int(freq) < 5000:
raise Exception("Unexpected frequency")
dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
+ dev[0].flush_scan_cache()
def test_ap_acs_vht160_scan_disable(dev, apdev):
"""Automatic channel selection for VHT160 and DISABLE during scan"""
def _test_ap_open_country(dev, apdev, country_code, country3):
try:
- run_ap_open_country(dev, apdev, country_code, country3)
+ hapd = None
+ hapd = run_ap_open_country(dev, apdev, country_code, country3)
finally:
+ if hapd:
+ hapd.request("DISABLE")
dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
set_world_reg(apdev[0], apdev[1], dev[0])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def run_ap_open_country(dev, apdev, country_code, country3):
"ieee80211d": "1" })
dev[0].scan_for_bss(hapd.own_addr(), freq=2412)
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
- dev[0].request("DISCONNECT")
- dev[0].wait_disconnected()
+ dev[0].wait_regdom(country_ie=True)
+ return hapd
def test_ap_open_disable_select(dev, apdev):
"""DISABLE_NETWORK for connected AP followed by SELECT_NETWORK"""
dev[0].connect(ssid, psk=passphrase, scan_freq="5180")
hwsim_utils.test_connectivity(dev[0], hapd)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_acl_accept(dev, apdev):
hapd = None
hapd = hostapd.add_ap(apdev[0], params)
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="5180")
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
@remote_compatible
raise Exception("Unexpected interface state")
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5180")
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=5180" not in sig:
raise HwsimSkip("80/160 MHz channel not supported in regulatory information")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_vht160b(dev, apdev):
raise Exception("Unexpected frequency(2)")
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5520")
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=5520" not in sig:
raise HwsimSkip("80/160 MHz channel not supported in regulatory information")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_vht160_no_dfs_100_plus(dev, apdev):
freq = str(int(channel) * 5 + 5000)
dev[0].connect("vht", key_mgmt="NONE", scan_freq=freq)
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=" + freq not in sig:
raise HwsimSkip("80/160 MHz channel not supported in regulatory information")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_vht160_no_ht40(dev, apdev):
hapd = hostapd.add_ap(apdev[0], params)
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5180")
+ dev[0].wait_regdom(country_ie=True)
except Exception, e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():
raise HwsimSkip("80 MHz channel not supported in regulatory information")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_ap_vht_use_sta_nsts(dev, apdev):
}
hapd = hostapd.add_ap(ap, params)
dev.connect("test-vht40", scan_freq="5805", key_mgmt="NONE")
+ dev.wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev, hapd)
finally:
- dev.request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev.request("DISCONNECT")
+ dev.request("ABORT_SCAN")
+ dev.wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev.wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev.flush_scan_cache()
def test_ap_vht80_to_24g_ht(dev, apdev):
raise Exception("Unexpected frequency")
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
hapd.request("RADAR DETECTED freq=5260 ht_enabled=1 chan_width=1")
time.sleep(1)
hwsim_utils.test_connectivity(dev[0], hapd)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_etsi(dev, apdev, params):
raise Exception("Unexpected frequency")
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
hapd.request("RADAR DETECTED freq=%s ht_enabled=1 chan_width=1" % freq)
time.sleep(1)
hwsim_utils.test_connectivity(dev[0], hapd)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar1(dev, apdev):
raise Exception("Unexpected frequency: " + freq)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar2(dev, apdev):
if "AP-ENABLED" not in ev:
raise Exception("Unexpected DFS event: " + ev)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar_chanlist_vht80(dev, apdev):
if "AP-ENABLED" not in ev:
raise Exception("Unexpected DFS event: " + ev)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
if hapd.get_status_field('vht_oper_centr_freq_seg0_idx') != "42":
raise Exception("Unexpected seg0 idx")
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar_chanlist_vht20(dev, apdev):
if "AP-ENABLED" not in ev:
raise Exception("Unexpected DFS event: " + ev)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar_no_ht(dev, apdev):
if "AP-ENABLED" not in ev:
raise Exception("Unexpected DFS event: " + ev)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_dfs_radar_ht40minus(dev, apdev):
if "AP-ENABLED" not in ev:
raise Exception("Unexpected DFS event: " + ev)
dev[0].connect("dfs", key_mgmt="NONE")
+ dev[0].wait_regdom(country_ie=True)
+ dev[0].request("STA_AUTOCONNECT 0")
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
+ dev[0].request("STA_AUTOCONNECT 1")
def test_dfs_ht40_minus(dev, apdev, params):
"""DFS CAC functionality on channel 104 HT40- [long]"""
raise Exception("Unexpected frequency")
dev[0].connect("dfs", key_mgmt="NONE", scan_freq="5520")
+ dev[0].wait_regdom(country_ie=True)
hwsim_utils.test_connectivity(dev[0], hapd)
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
for ocv in range(2):
dev[0].connect(ssid, psk=passphrase, scan_freq="5200", ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
ieee80211w="1", disable_ht="1")
dev[1].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
ieee80211w="1", disable_vht="1")
dev[2].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
dev[2].request("REMOVE_NETWORK all")
ieee80211w="1", disable_vht="1")
dev[2].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
dev[2].request("REMOVE_NETWORK all")
ieee80211w="1", disable_vht="1")
dev[2].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
dev[2].request("REMOVE_NETWORK all")
run_wpa2_ocv_vht80plus80(dev, apdev)
finally:
set_world_reg(apdev[0], apdev[1], dev[0])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
dev[2].flush_scan_cache()
ieee80211w="1", disable_vht="1")
dev[2].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
ieee80211w="1")
+ dev[0].wait_regdom(country_ie=True)
dev[0].request("REMOVE_NETWORK all")
dev[1].request("REMOVE_NETWORK all")
dev[2].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
dev[1].wait_disconnected()
dev[2].wait_disconnected()
+ for i in range(3):
+ dev[i].connect(ssid, psk=passphrase, scan_freq=freq, ocv=str(ocv),
+ ieee80211w="1")
+ if i == 0:
+ dev[i].wait_regdom(country_ie=True)
hapd.disable()
+ for i in range(3):
+ dev[i].request("DISCONNECT")
+ dev[i].request("ABORT_SCAN")
+ for i in range(3):
+ dev[i].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
class APConnection:
def init_params(self):
dev.connect(self.ssid, raw_psk=self.psk, scan_freq=freq, ocv=sta_ocv,
ieee80211w="1", wait_connect=False)
+ if "country_code" in params:
+ dev.wait_regdom(country_ie=True)
self.addr = dev.p2p_interface_addr()
# Wait for EAPOL-Key msg 1/4 from hostapd to determine when associated
run_wpa2_ocv_ap_vht160_mismatch(dev, apdev)
finally:
set_world_reg(apdev[0], apdev[1], dev[0])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def run_wpa2_ocv_ap_vht160_mismatch(dev, apdev):
conn.confirm_valid_oci(129, 100, 0)
dev[0].dump_monitor()
+ if conn.hapd:
+ conn.hapd.request("DISABLE")
dev[0].request("DISCONNECT")
- dev[0].wait_disconnected()
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
@remote_compatible
def test_wpa2_ocv_ap_vht80plus80_mismatch(dev, apdev):
run_wpa2_ocv_ap_vht80plus80_mismatch(dev, apdev)
finally:
set_world_reg(apdev[0], apdev[1], dev[0])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def run_wpa2_ocv_ap_vht80plus80_mismatch(dev, apdev):
conn.confirm_valid_oci(130, 36, 155)
dev[0].dump_monitor()
+ if conn.hapd:
+ conn.hapd.request("DISABLE")
dev[0].request("DISCONNECT")
- dev[0].wait_disconnected()
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
@remote_compatible
def test_wpa2_ocv_ap_unexpected1(dev, apdev):
self.dev.connect(self.ssid, raw_psk=self.psk, scan_freq=freq,
wait_connect=False, **sta_params)
+ if "country_code" in params:
+ self.dev.wait_regdom(country_ie=True)
self.addr = dev.p2p_interface_addr()
# Forward msg 1/4 from AP to STA
run_wpa2_ocv_vht160_mismatch_client(dev, apdev)
finally:
set_world_reg(apdev[0], apdev[1], dev[0])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def run_wpa2_ocv_vht160_mismatch_client(dev, apdev):
129, 104, 0, "primary channel mismatch")
conn.confirm_valid_oci(122, 100, 0)
+ dev[0].dump_monitor()
+ if conn.hapd:
+ conn.hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
+
def test_wpa2_ocv_sta_group_hs(dev, apdev):
"""OCV group handshake (STA)"""
params = { "channel": "1",
raise HwsimSkip("80 MHz channel not supported in regulatory information")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_rrm_beacon_req_passive_scan_vht160(dev, apdev):
raise HwsimSkip("ZA regulatory rule likely did not have DFS requirement removed")
raise
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_rrm_beacon_req_ap_errors(dev, apdev):
ev = dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
if ev is None or "init=COUNTRY_IE" in ev:
break
- dev[0].request("DISCONNECT")
- dev[0].request("ABORT_SCAN")
- dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
if hapd:
hapd.request("DISABLE")
if hapd2:
hapd2.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
dev[0].dump_monitor()
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
return hapd, id
def stop_wnm_tm(hapd, dev):
+ if hapd:
+ hapd.request("DISABLE")
dev.request("DISCONNECT")
try:
dev.wait_disconnected()
except:
pass
- if hapd:
- hapd.request("DISABLE")
subprocess.call(['iw', 'reg', 'set', '00'])
dev.flush_scan_cache()
if "status_code=123" not in ev:
raise Exception("Unexpected BSS Transition Management Response status: " + ev)
dev[0].wait_disconnected()
+ dev[0].wait_connected()
finally:
- dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
+ dev[0].request("DISCONNECT")
+ dev[0].request("ABORT_SCAN")
+ dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
subprocess.call(['iw', 'reg', 'set', '00'])
+ dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
dev[0].flush_scan_cache()
def test_wnm_bss_tm_ap_proto(dev, apdev):
raise Exception("AP failed to start")
dev[1].connect("wpas-ap-dfs", key_mgmt="NONE")
+ dev[1].wait_regdom(country_ie=True)
+ dev[0].request("DISCONNECT")
dev[1].request("DISCONNECT")
+ dev[1].request("ABORT_SCAN")
dev[1].wait_disconnected()
@remote_compatible