diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 4436a5367a68..cd444962c24f 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -558,8 +558,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc) qdf_status = htc_wait_target(HTCHandle); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: Failed to complete BMI phase", __func__); + cds_alert("Complete BMI phase failed. status: %d", qdf_status); if (qdf_status != QDF_STATUS_E_NOMEM && !cds_is_fw_down()) @@ -667,8 +666,9 @@ err_bmi_close: bmi_cleanup(ol_ctx); err_sched_close: - if (hdd_ctx->driver_status == DRIVER_MODULES_UNINITIALIZED || - cds_is_driver_recovering()) { + if (QDF_IS_STATUS_SUCCESS(qdf_status) && + (hdd_ctx->driver_status == DRIVER_MODULES_UNINITIALIZED || + cds_is_driver_recovering())) { qdf_status = cds_sched_close(); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to close CDS Scheduler"); @@ -682,7 +682,7 @@ err_wma_complete_event: err_probe_event: qdf_event_destroy(&gp_cds_context->ProbeEvent); - return QDF_STATUS_E_FAILURE; + return qdf_status; } /* cds_open() */ /** diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 6a27ed2f96ec..9b4636e43b2e 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -56,7 +56,7 @@ #define DISABLE_KRAIT_IDLE_PS_VAL 1 -#define SSR_MAX_FAIL_CNT 2 +#define SSR_MAX_FAIL_CNT 3 static uint8_t re_init_fail_cnt, probe_fail_cnt; /* diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d3b087b05cab..7fa1d911777d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2300,7 +2300,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter, bool reinit) { - int ret; + int ret = 0; qdf_device_t qdf_dev; QDF_STATUS status; bool unint = false; @@ -2373,6 +2373,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, status = cds_open(hdd_ctx->hdd_psoc); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("Failed to Open CDS: %d", status); + ret = (status == QDF_STATUS_E_NOMEM) ? -ENOMEM : -EINVAL; goto ol_cds_free; } @@ -2396,6 +2397,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, status = cds_pre_enable(); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("Failed to pre-enable CDS: %d", status); + ret = (status == QDF_STATUS_E_NOMEM) ? -ENOMEM : -EINVAL; goto close; } @@ -2474,7 +2476,7 @@ release_lock: mutex_unlock(&hdd_ctx->iface_change_lock); EXIT(); - return -EINVAL; + return ret; } #ifdef WIFI_POS_CONVERGED @@ -9946,7 +9948,7 @@ err_hdd_free_context: qdf_mc_timer_destroy(&hdd_ctx->iface_change_timer); mutex_destroy(&hdd_ctx->iface_change_lock); hdd_context_destroy(hdd_ctx); - return -EIO; + return ret; success: EXIT();