mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
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
This commit is contained in:
parent
f254886c3d
commit
78e34459fd
1 changed files with 5 additions and 1 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue