qcacmn: Fix calculation of getting head/tail pointer

The current calculation of head/tail pointer for
srng gives an index in the array by skipping
entry_size dwords.
The head/tail pointers are preffered to be the
index values like in the srng registers, which
brings them in alignment with the other usage of
head/tail pointers.

Fix the calculation of head/tail pointers for srng
by avoiding the division by srng entry size.

CRs-Fixed: 2469332
Change-Id: If9a167f3fac3cb39ebe59618e9ad2224d9e54bcc
This commit is contained in:
Rakesh Pillai
2019-06-05 00:25:48 +05:30
committed by nshrivas
parent 7c72252ec8
commit 56320c1e4d
2 changed files with 8 additions and 12 deletions

View File

@@ -895,11 +895,11 @@ static inline void hal_get_sw_hptp(void *hal_soc, void *hal_ring,
struct hal_srng *srng = (struct hal_srng *)hal_ring;
if (srng->ring_dir == HAL_SRNG_SRC_RING) {
*headp = srng->u.src_ring.hp / srng->entry_size;
*tailp = *(srng->u.src_ring.tp_addr) / srng->entry_size;
*headp = srng->u.src_ring.hp;
*tailp = *srng->u.src_ring.tp_addr;
} else {
*tailp = srng->u.dst_ring.tp / srng->entry_size;
*headp = *(srng->u.dst_ring.hp_addr) / srng->entry_size;
*tailp = srng->u.dst_ring.tp;
*headp = *srng->u.dst_ring.hp_addr;
}
}