@@ -4,6 +4,7 @@
# This software may be distributed under the terms of the BSD license.
# See README for more details.
+import os
import time
import logging
logger = logging.getLogger()
@@ -302,6 +303,13 @@ def _test_wpas_ap_dfs(dev):
# For now, assume DFS is not supported by all kernel builds.
raise HwsimSkip("CAC did not start - assume not supported")
+ state = dev[0].get_status_field("wpa_state")
+ if state != "DFS":
+ logger.info("Interface state not DFS: " + state)
+ if not os.path.exists("dfs"):
+ raise HwsimSkip("Assume DFS testing not supported")
+ raise Exception("Failed to start DFS AP")
+
ev = dev[0].wait_event(["DFS-CAC-COMPLETED"], timeout=70)
if ev is None:
raise Exception("CAC did not complete")