diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index ef76798f9c3f..ce36f71aff6a 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -5885,7 +5885,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, goto error; } - qdf_status = qdf_wait_for_event_completion(&hostapd_state->qdf_event, + qdf_status = qdf_wait_single_event(&hostapd_state->qdf_event, SME_CMD_START_BSS_TIMEOUT); wlansap_reset_sap_config_add_ie(config, eUPDATE_IE_ALL); @@ -5902,7 +5902,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, hdd_set_connection_in_progress(false); sme_get_command_q_status(mac_handle); wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(adapter)); - QDF_ASSERT(0); + if (!cds_is_driver_recovering()) + QDF_ASSERT(0); ret = -EINVAL; goto error; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 44873ffca6ef..5877b6be9a15 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -16292,7 +16292,7 @@ void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit) goto end; hdd_debug("Waiting for SAP to start"); - qdf_status = qdf_wait_for_event_completion(&hostapd_state->qdf_event, + qdf_status = qdf_wait_single_event(&hostapd_state->qdf_event, SME_CMD_START_BSS_TIMEOUT); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("SAP Start failed"); @@ -18542,7 +18542,7 @@ void hdd_restart_sap(struct hdd_adapter *ap_adapter) hdd_info("Waiting for SAP to start"); qdf_status = - qdf_wait_for_event_completion(&hostapd_state->qdf_event, + qdf_wait_single_event(&hostapd_state->qdf_event, SME_CMD_START_BSS_TIMEOUT); wlansap_reset_sap_config_add_ie(sap_config, eUPDATE_IE_ALL); diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 8d06b73de434..d8383f10b0a3 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -1533,8 +1533,8 @@ static void hdd_restart_sap_with_new_phymode(struct hdd_context *hdd_ctx, hdd_err("SAP Start Bss fail"); return; } - status = qdf_wait_for_event_completion(&hostapd_state->qdf_event, - SME_CMD_START_BSS_TIMEOUT); + status = qdf_wait_single_event(&hostapd_state->qdf_event, + SME_CMD_START_BSS_TIMEOUT); if (!QDF_IS_STATUS_SUCCESS(status)) { mutex_unlock(&hdd_ctx->sap_lock); hdd_err("SAP Start timeout"); diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f7549900fd3f..a36f8514cab2 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2433,7 +2433,7 @@ static QDF_STATUS sap_fsm_handle_radar_during_cac(struct sap_context *sap_ctx, } /** - * sap_fsm_handle_start_failure() - handle start failure or stop during cac wait + * sap_fsm_handle_start_failure() - handle sap start failure * @sap_ctx: SAP context * @msg: event msg * @mac_handle: Opaque handle to the global MAC context @@ -2446,13 +2446,11 @@ static QDF_STATUS sap_fsm_handle_start_failure(struct sap_context *sap_ctx, { QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; - if (msg == eSAP_HDD_STOP_INFRA_BSS && - (QDF_IS_STATUS_SUCCESS(wlan_vdev_is_dfs_cac_wait(sap_ctx->vdev)) || - QDF_IS_STATUS_SUCCESS( - wlan_vdev_is_restart_progress(sap_ctx->vdev)))) { + if (msg == eSAP_HDD_STOP_INFRA_BSS) { /* Transition from SAP_STARTING to SAP_STOPPING */ - sap_debug("In cac wait state from state %s => %s", + sap_debug("SAP start is in progress, state from state %s => %s", "SAP_STARTING", "SAP_STOPPING"); + /* * Stop the CAC timer only in following conditions * single AP: if there is a single AP then stop timer