diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 098b8ea2d3..a9f7dc5bb5 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -4310,10 +4310,11 @@ dp_tx_comp_process_desc_list(struct dp_soc *soc, next = desc->next; dp_tx_desc_history_add(soc, desc->dma_addr, desc->nbuf, desc->id, DP_TX_COMP_UNMAP); - qdf_mem_unmap_nbytes_single(soc->osdev, - desc->dma_addr, - QDF_DMA_TO_DEVICE, - desc->length); + qdf_nbuf_unmap_nbytes_single_paddr(soc->osdev, + desc->nbuf, + desc->dma_addr, + QDF_DMA_TO_DEVICE, + desc->length); qdf_nbuf_free(desc->nbuf); dp_tx_desc_free(soc, desc, desc->pool_id); desc = next; diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h index 8adbbe7b96..8e1d270338 100644 --- a/qdf/inc/qdf_nbuf.h +++ b/qdf/inc/qdf_nbuf.h @@ -862,6 +862,16 @@ void qdf_nbuf_unmap_nbytes_single_debug(qdf_device_t osdev, qdf_nbuf_unmap_nbytes_single_debug(osdev, buf, dir, nbytes, \ __func__, __LINE__) +void qdf_nbuf_unmap_nbytes_single_paddr_debug(qdf_device_t osdev, + qdf_nbuf_t buf, + qdf_dma_addr_t phy_addr, + qdf_dma_dir_t dir, int nbytes, + const char *func, uint32_t line); + +#define qdf_nbuf_unmap_nbytes_single_paddr(osdev, buf, phy_addr, dir, nbytes) \ + qdf_nbuf_unmap_nbytes_single_paddr_debug(osdev, buf, phy_addr, \ + dir, nbytes, __func__, \ + __LINE__) #else /* NBUF_MAP_UNMAP_DEBUG */ static inline void qdf_nbuf_map_check_for_leaks(void) {} @@ -917,6 +927,14 @@ qdf_nbuf_unmap_nbytes_single( { return __qdf_nbuf_unmap_nbytes_single(osdev, buf, dir, nbytes); } + +static inline void +qdf_nbuf_unmap_nbytes_single_paddr(qdf_device_t osdev, qdf_nbuf_t buf, + qdf_dma_addr_t phy_addr, qdf_dma_dir_t dir, + int nbytes) +{ + __qdf_mem_unmap_nbytes_single(osdev, phy_addr, dir, nbytes); +} #endif /* NBUF_MAP_UNMAP_DEBUG */ /** diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index ab1e08555b..9b6f328287 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -996,6 +996,19 @@ void qdf_nbuf_unmap_nbytes_single_debug(qdf_device_t osdev, qdf_export_symbol(qdf_nbuf_unmap_nbytes_single_debug); +void qdf_nbuf_unmap_nbytes_single_paddr_debug(qdf_device_t osdev, + qdf_nbuf_t buf, + qdf_dma_addr_t phy_addr, + qdf_dma_dir_t dir, int nbytes, + const char *func, uint32_t line) +{ + qdf_nbuf_untrack_map(buf, func, line); + __qdf_mem_unmap_nbytes_single(osdev, phy_addr, dir, nbytes); + qdf_net_buf_debug_update_unmap_node(buf, func, line); +} + +qdf_export_symbol(qdf_nbuf_unmap_nbytes_single_paddr_debug); + static void qdf_nbuf_panic_on_free_if_mapped(qdf_nbuf_t nbuf, const char *func, uint32_t line)