Kaynağa Gözat

qcacmn: Unmap DMA region mapped for nbuf in rx_desc

In attach and replenish path, nbuf maps a DMA region for device access.
But the DMA region mapped is not unmapped in detach path.

Fix is to unmap the DMA region when rx_desc_pool is freed.

Change-Id: If3e93113e59c7eec4419cb1d9228ee95c5b74b39
CRs-Fixed: 2149014
jiad 7 yıl önce
ebeveyn
işleme
78e34459fd
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      dp/wifi3.0/dp_rx_desc.c

+ 5 - 1
dp/wifi3.0/dp_rx_desc.c

@@ -80,8 +80,12 @@ void dp_rx_desc_pool_free(struct dp_soc *soc, uint32_t pool_id,
 
 	qdf_spin_lock_bh(&soc->rx_desc_mutex[pool_id]);
 	for (i = 0; i < rx_desc_pool->pool_size; i++) {
-		if (rx_desc_pool->array[i].rx_desc.in_use)
+		if (rx_desc_pool->array[i].rx_desc.in_use) {
+			qdf_nbuf_unmap_single(soc->osdev,
+					rx_desc_pool->array[i].rx_desc.nbuf,
+					QDF_DMA_BIDIRECTIONAL);
 			qdf_nbuf_free(rx_desc_pool->array[i].rx_desc.nbuf);
+		}
 	}
 	qdf_mem_free(rx_desc_pool->array);
 	qdf_spin_unlock_bh(&soc->rx_desc_mutex[pool_id]);