From 0412d9a24f4ff38a3d116fa76d3a878e23e7acda Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Thu, 7 May 2020 12:38:06 +0530 Subject: [PATCH] qcacld-3.0: Call the ucfg cfr api when CFR HTT msg is received Firmware sends the HTT msg which has information about the CFR. This information is required by CFR component to get the CFR data capture. Call CFR ucfg api to pass this CFR related info to the CFR component. Change-Id: I6e9bdd991d8e7f84f35231900fc00ed18e89f835 CRs-Fixed: 2724722 --- core/dp/txrx/ol_rx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index dfb62b57db11..861215a2fddf 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -57,6 +57,7 @@ #include #include #include +#include #ifndef OL_RX_INDICATION_MAX_RECORDS #define OL_RX_INDICATION_MAX_RECORDS 2048 @@ -2002,11 +2003,12 @@ void ol_ath_add_vow_extstats(htt_pdev_handle pdev, qdf_nbuf_t msdu) #ifdef WLAN_CFR_ENABLE void ol_rx_cfr_capture_msg_handler(qdf_nbuf_t htt_t2h_msg) { + struct ol_txrx_soc_t *soc = cds_get_context(QDF_MODULE_ID_SOC); HTT_PEER_CFR_CAPTURE_MSG_TYPE cfr_type; struct htt_cfr_dump_compl_ind *cfr_dump; struct htt_cfr_dump_ind_type_1 cfr_ind; struct csi_cfr_header cfr_hdr = {}; - uint32_t mem_index, vdev_id; + uint32_t mem_index, req_id, vdev_id; uint32_t *msg_word; uint8_t *mac_addr; @@ -2023,6 +2025,11 @@ void ol_rx_cfr_capture_msg_handler(qdf_nbuf_t htt_t2h_msg) /* Second payload word */ msg_word++; + req_id = HTT_T2H_CFR_DUMP_TYPE1_MEM_REQ_ID_GET(*msg_word); + if (req_id != CFR_CAPTURE_HOST_MEM_REQ_ID) { + ol_txrx_err("Invalid req id in cfr capture msg"); + return; + } cfr_hdr.start_magic_num = 0xDEADBEAF; cfr_hdr.u.meta_v1.status = HTT_T2H_CFR_DUMP_TYPE1_STATUS_GET( *msg_word); @@ -2052,5 +2059,7 @@ void ol_rx_cfr_capture_msg_handler(qdf_nbuf_t htt_t2h_msg) cfr_hdr.u.meta_v1.timestamp = cfr_ind.timestamp; mem_index = cfr_ind.index; + + ucfg_cfr_capture_data((void *)soc->psoc, vdev_id, &cfr_hdr, mem_index); } #endif