瀏覽代碼

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
Sai Rupesh Chevuru 3 年之前
父節點
當前提交
d365912c55
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      hal/wifi3.0/hal_srng.c

+ 12 - 0
hal/wifi3.0/hal_srng.c

@@ -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;