Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9947e0ad authored by Govind Singh's avatar Govind Singh Committed by Akash Patel
Browse files

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
parent 2782fb52
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -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