From 5832077a65ea061de8cddd444e67cc7195b0b4b1 Mon Sep 17 00:00:00 2001 From: Visweswara Tanuku Date: Wed, 20 Mar 2019 14:30:26 +0530 Subject: [PATCH] qcacmn: In Epping, Pass BMI context to bmi_done and bmi_cleanup In epping_enable bmi_done is called with null context due to which bmi finish is incomplete Pass BMI Context before invoking bmi_done and bmi_cleanup Change-Id: Ic7f424a03cb92d6d3218b5fa148ea95d6011cfed CRs-Fixed: 2419720 --- utils/epping/src/epping_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/epping/src/epping_main.c b/utils/epping/src/epping_main.c index 1242930164b1..7f8ceb83df65 100644 --- a/utils/epping/src/epping_main.c +++ b/utils/epping/src/epping_main.c @@ -198,13 +198,6 @@ static void epping_update_ol_config(void) static QDF_STATUS epping_bmi_download_fw(struct ol_context *ol_ctx) { - ol_ctx = cds_get_context(QDF_MODULE_ID_BMI); - if (!ol_ctx) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: ol_ctx is NULL", __func__); - return QDF_STATUS_E_INVAL; - } - epping_update_ol_config(); /* Initialize BMI and Download firmware */ @@ -280,6 +273,13 @@ int epping_enable(struct device *parent_dev, bool rtnl_held) tgt_info = hif_get_target_info_handle(scn); + ol_ctx = cds_get_context(QDF_MODULE_ID_BMI); + if (!ol_ctx) { + QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, + "%s: ol_ctx is NULL", __func__); + return A_ERROR; + } + if (epping_bmi_download_fw(ol_ctx) != QDF_STATUS_SUCCESS) return A_ERROR;