From 10de40c0c80977e55818baa3fdb13ae16be847d0 Mon Sep 17 00:00:00 2001 From: Zefir Kurtisi Date: Mon, 7 Jan 2019 11:58:08 +0100 Subject: [PATCH] DFS: Restart pending CAC on interface enable When an interface is re-enabled after it was disabled during CAC, it won't ever get active since hostapd is waiting for a CAC_FINISHED while kernel side is waiting for a CMD_RADAR_DETECT to start a CAC. This commit checks for a pending CAC when an interface is enabled and if so restarts its DFS processing. Signed-off-by: Zefir Kurtisi --- src/ap/drv_callbacks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index d49ad4c41..54be3b524 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -1729,6 +1729,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, hostapd_reconfig_encryption(hapd); hapd->reenable_beacon = 1; ieee802_11_set_beacon(hapd); +#ifdef NEED_AP_MLME + } else if (hapd->disabled && hapd->iface->cac_started) { + wpa_printf(MSG_DEBUG, "DFS: restarting pending CAC"); + hostapd_handle_dfs(hapd->iface); +#endif /* NEED_AP_MLME */ } break; case EVENT_INTERFACE_DISABLED: