From 9947e0ad5d00d6e53c56bf18f4aa5f4475bbd98c Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Mon, 28 Dec 2015 23:07:54 +0530 Subject: [PATCH] qcacld-3.0: Fix IPA-uc callback in NON-SMP system IPA callbacks need to be processed in tasklet context in NON-SMP configuration as rx thread is not used in NON-SMP context. Hence Process IPA uc response in tasklet context for NON-SMP configuration. CRs-Fixed: 960302 Change-Id: I98d69dbdc1083f43035fe264bbee668e5efd5eee --- core/dp/txrx/ol_txrx.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 2a75a527609d..f1aa269bccee 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -2777,16 +2777,20 @@ void ol_txrx_ipa_uc_fw_op_event_handler(void *context, if (cdf_unlikely(!pdev)) { CDF_TRACE(CDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR, "%s: Invalid context", __func__); + cdf_mem_free(rxpkt); return; } - if (pdev->ipa_uc_op_cb) + if (pdev->ipa_uc_op_cb) { pdev->ipa_uc_op_cb(rxpkt, pdev->osif_dev); - else + } else { CDF_TRACE(CDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR, "%s: ipa_uc_op_cb NULL", __func__); + cdf_mem_free(rxpkt); + } } +#ifdef QCA_CONFIG_SMP /** * ol_txrx_ipa_uc_op_response() - Handle OP command response from firmware * @pdev: handle to the HTT instance @@ -2815,6 +2819,20 @@ void ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, uint8_t *op_msg) pkt->staId = 0; cds_indicate_rxpkt(sched_ctx, pkt); } +#else +void ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, + uint8_t *op_msg) +{ + if (pdev->ipa_uc_op_cb) { + pdev->ipa_uc_op_cb(op_msg, pdev->osif_dev); + } else { + CDF_TRACE(CDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR, + "%s: IPA callback function is not registered", __func__); + cdf_mem_free(op_msg); + return; + } +} +#endif /** * ol_txrx_ipa_uc_register_op_cb() - Register OP handler function