diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 40fefac7c3ab..bcd8edfd1271 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -313,7 +313,7 @@ QDF_STATUS cds_pre_enable(void); QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc); -QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc, v_CONTEXT_t cds_context); +QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc); QDF_STATUS cds_disable(struct wlan_objmgr_psoc *psoc, v_CONTEXT_t cds_context); diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 23fc4ff57e9a..6361c9c50494 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -812,23 +812,22 @@ QDF_STATUS cds_pre_enable(void) * * Return: QDF status */ -QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc, v_CONTEXT_t cds_context) +QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc) { QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; tSirRetStatus sirStatus = eSIR_SUCCESS; - p_cds_contextType p_cds_context = (p_cds_contextType) cds_context; tHalMacStartParameters halStartParams; /* We support only one instance for now ... */ - if (gp_cds_context != p_cds_context) { + if (!gp_cds_context) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: mismatch in context", __func__); + "%s: Invalid CDS context", __func__); return QDF_STATUS_E_FAILURE; } - if ((p_cds_context->pWMAContext == NULL) || - (p_cds_context->pMACContext == NULL)) { - if (p_cds_context->pWMAContext == NULL) + if ((gp_cds_context->pWMAContext == NULL) || + (gp_cds_context->pMACContext == NULL)) { + if (gp_cds_context->pWMAContext == NULL) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "%s: WMA NULL context", __func__); else @@ -854,7 +853,7 @@ QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc, v_CONTEXT_t cds_context) /* Start the MAC */ sirStatus = - mac_start(p_cds_context->pMACContext, &halStartParams); + mac_start(gp_cds_context->pMACContext, &halStartParams); if (eSIR_SUCCESS != sirStatus) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, @@ -866,7 +865,7 @@ QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc, v_CONTEXT_t cds_context) "%s: MAC correctly started", __func__); /* START SME */ - qdf_status = sme_start(p_cds_context->pMACContext); + qdf_status = sme_start(gp_cds_context->pMACContext); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, @@ -901,10 +900,10 @@ err_soc_target_detach: /* NOOP */ err_sme_stop: - sme_stop(p_cds_context->pMACContext, HAL_STOP_TYPE_SYS_RESET); + sme_stop(gp_cds_context->pMACContext, HAL_STOP_TYPE_SYS_RESET); err_mac_stop: - mac_stop(p_cds_context->pMACContext, HAL_STOP_TYPE_SYS_RESET); + mac_stop(gp_cds_context->pMACContext, HAL_STOP_TYPE_SYS_RESET); err_wma_stop: qdf_event_reset(&(gp_cds_context->wmaCompleteEvent)); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 5d2849d51b65..703e2616afc5 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9213,7 +9213,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter) * Start CDS which starts up the SME/MAC/HAL modules and everything * else */ - status = cds_enable(hdd_ctx->hdd_psoc, hdd_ctx->pcds_context); + status = cds_enable(hdd_ctx->hdd_psoc); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("cds_enable failed");