except Exception, e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():
- raise HwsimSwkip("80 MHz channel not supported in regulatory information")
+ raise HwsimSkip("80 MHz channel not supported in regulatory information")
raise
finally:
dev[0].request("DISCONNECT")
"vht_oper_centr_freq_seg1_idx": "155" }
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
- ev = hapd2.wait_event(["AP-ENABLED"], timeout=5)
+ ev = hapd2.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=5)
if not ev:
raise Exception("AP setup timed out(2)")
+ if "AP-DISABLED" in ev:
+ # Assume this failed due to missing regulatory update for now
+ raise HwsimSkip("80+80 MHz channel not supported in regulatory information")
state = hapd2.get_status_field("state")
if state != "ENABLED":
def test_dfs(dev, apdev):
"""DFS CAC functionality on clear channel"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], allow_failure=True)
ev = wait_dfs_event(hapd, "DFS-CAC-COMPLETED", 70)
def test_dfs_radar(dev, apdev):
"""DFS CAC functionality with radar detected"""
try:
+ hapd = None
hapd2 = None
hapd = start_dfs_ap(apdev[0], allow_failure=True)
time.sleep(1)
def test_dfs_radar_chanlist(dev, apdev):
"""DFS chanlist when radar is detected"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], chanlist="40 44", allow_failure=True)
time.sleep(1)
def test_dfs_radar_chanlist_vht80(dev, apdev):
"""DFS chanlist when radar is detected and VHT80 configured"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], chanlist="36", ht40=True, vht80=True,
allow_failure=True)
time.sleep(1)
def test_dfs_radar_chanlist_vht20(dev, apdev):
"""DFS chanlist when radar is detected and VHT40 configured"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], chanlist="36", vht20=True,
allow_failure=True)
time.sleep(1)
def test_dfs_radar_no_ht(dev, apdev):
"""DFS chanlist when radar is detected and no HT configured"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], chanlist="36", ht=False,
allow_failure=True)
time.sleep(1)
def test_dfs_radar_ht40minus(dev, apdev):
"""DFS chanlist when radar is detected and HT40- configured"""
try:
+ hapd = None
hapd = start_dfs_ap(apdev[0], chanlist="36", ht40minus=True,
allow_failure=True)
time.sleep(1)