From 05f4bb3104081c5b7d2229ce07320a1867ad2346 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Tue, 27 Apr 2021 22:22:42 +0530 Subject: [PATCH] qcacmn: Return the entry size in bytes from srng hal_get_entrysize_from_srng returns the entry size in dwords but the caller expects in bytes. This results in insufficient data to be recorded for CE event. Fix is to left shift the entry size by two bits in hal_get_entrysize_from_srng so that the entry size value returned is in bytes. Change-Id: If532da7abe5ce9c293969f0052455085f18b1926 CRs-Fixed: 2935196 --- hal/wifi3.0/hal_api.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hal/wifi3.0/hal_api.h b/hal/wifi3.0/hal_api.h index a1939ef62f..36689828e1 100644 --- a/hal/wifi3.0/hal_api.h +++ b/hal/wifi3.0/hal_api.h @@ -1794,6 +1794,9 @@ hal_srng_src_done_val(void *hal_soc, hal_ring_handle_t hal_ring_hdl) * hal_get_entrysize_from_srng() - Retrieve ring entry size * @hal_ring_hdl: Source ring pointer * + * srng->entry_size value is in 4 byte dwords so left shifting + * this by 2 to return the value of entry_size in bytes. + * * Return: uint8_t */ static inline @@ -1801,7 +1804,7 @@ uint8_t hal_get_entrysize_from_srng(hal_ring_handle_t hal_ring_hdl) { struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl; - return srng->entry_size; + return srng->entry_size << 2; } /**