qcacmn: Flush and invalidation of descriptor memory at allocation

Flush and invalidation of descriptor memory at allocation is helping
to avoid NULL descriptors issues in TX and RX path.

Change-Id: Ifcdb65df01365e7ec0b0be59d8b4bf862d90943d
CRs-Fixed: 3180696
This commit is contained in:
Sai Rupesh Chevuru
2022-04-22 12:32:00 +05:30
committad av Madan Koyyalamudi
förälder 263d5b8138
incheckning d365912c55

Visa fil

@@ -1540,6 +1540,18 @@ void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
srng->num_entries) << 2);
srng->flags = ring_params->flags;
/* For cached descriptors flush and invalidate the memory*/
if (srng->flags & HAL_SRNG_CACHED_DESC) {
qdf_nbuf_dma_clean_range(
srng->ring_base_vaddr,
srng->ring_base_vaddr +
((srng->entry_size * srng->num_entries)));
qdf_nbuf_dma_inv_range(
srng->ring_base_vaddr,
srng->ring_base_vaddr +
((srng->entry_size * srng->num_entries)));
}
#ifdef BIG_ENDIAN_HOST
/* TODO: See if we should we get these flags from caller */
srng->flags |= HAL_SRNG_DATA_TLV_SWAP;