From 276f3b27ac8a775cca789443b416b96b010bbd74 Mon Sep 17 00:00:00 2001 From: Karthik Kantamneni Date: Wed, 14 Sep 2022 15:43:27 +0530 Subject: [PATCH] qcacmn: Add rind id info in TX HW descriptor history Add ring id info in TX HW descriptor event history, this helps to map history event to corresponding HW TX ring in multi TX queue enabled case. Change-Id: I82dcece76b1342f4086d489ba489da7c20ea6cad CRs-Fixed: 3294177 --- dp/wifi3.0/be/dp_be_tx.c | 2 +- dp/wifi3.0/dp_tx.h | 5 +++-- dp/wifi3.0/dp_types.h | 1 + dp/wifi3.0/li/dp_li_tx.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/be/dp_be_tx.c b/dp/wifi3.0/be/dp_be_tx.c index aef488c745..19164e2017 100644 --- a/dp/wifi3.0/be/dp_be_tx.c +++ b/dp/wifi3.0/be/dp_be_tx.c @@ -906,7 +906,7 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev, status = QDF_STATUS_SUCCESS; dp_tx_hw_desc_update_evt((uint8_t *)hal_tx_desc_cached, - hal_ring_hdl, soc); + hal_ring_hdl, soc, ring_id); ring_access_fail: dp_tx_ring_access_end_wrapper(soc, hal_ring_hdl, coalesce); diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index f7dfb5532e..872249c528 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -902,7 +902,7 @@ dp_set_rtpm_tput_policy_requirement(struct cdp_soc_t *soc_hdl, static inline void dp_tx_hw_desc_update_evt(uint8_t *hal_tx_desc_cached, hal_ring_handle_t hal_ring_hdl, - struct dp_soc *soc) + struct dp_soc *soc, uint8_t ring_id) { struct dp_tx_hw_desc_history *tx_hw_desc_history = &soc->tx_hw_desc_history; @@ -922,13 +922,14 @@ dp_tx_hw_desc_update_evt(uint8_t *hal_tx_desc_cached, evt = &tx_hw_desc_history->entry[slot][idx]; qdf_mem_copy(evt->tcl_desc, hal_tx_desc_cached, HAL_TX_DESC_LEN_BYTES); evt->posted = qdf_get_log_timestamp(); + evt->tcl_ring_id = ring_id; hal_get_sw_hptp(soc->hal_soc, hal_ring_hdl, &evt->tp, &evt->hp); } #else static inline void dp_tx_hw_desc_update_evt(uint8_t *hal_tx_desc_cached, hal_ring_handle_t hal_ring_hdl, - struct dp_soc *soc) + struct dp_soc *soc, uint8_t ring_id) { } #endif diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index dd5aeb9c05..4fb06bebf8 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -1398,6 +1398,7 @@ struct rx_refill_buff_pool { struct dp_tx_hw_desc_evt { uint8_t tcl_desc[HAL_TX_DESC_LEN_BYTES]; + uint8_t tcl_ring_id; uint64_t posted; uint32_t hp; uint32_t tp; diff --git a/dp/wifi3.0/li/dp_li_tx.c b/dp/wifi3.0/li/dp_li_tx.c index 5d1f14cece..15b3d39838 100644 --- a/dp/wifi3.0/li/dp_li_tx.c +++ b/dp/wifi3.0/li/dp_li_tx.c @@ -537,7 +537,7 @@ dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev, status = QDF_STATUS_SUCCESS; dp_tx_hw_desc_update_evt((uint8_t *)hal_tx_desc_cached, - hal_ring_hdl, soc); + hal_ring_hdl, soc, ring_id); ring_access_fail: dp_tx_ring_access_end_wrapper(soc, hal_ring_hdl, coalesce);