diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 4201d18f2a..1559e55ae8 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6106,7 +6106,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); @@ -6123,7 +6123,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 9b5007e614..a8aad9f5b4 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -16556,7 +16556,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"); @@ -18946,7 +18946,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 14799868a7..5e36d9801f 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -1637,8 +1637,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 a776b4b00f..29abd1eb4a 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2872,7 +2872,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 @@ -2885,13 +2885,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