qcacmn: Change nbuf unmap API when free rx nbuf

The DMA Map/Unmap was restricted to buffer size in rx process.
But the Unmap API was not changed when free nbuf in rx desc,
apply the new unmap API.

Change-Id: Id10d746776aa9e41ef3425e166ba0207851358d6
CRs-Fixed: 2716690
This commit is contained in:
Guisen Yang
2020-06-18 16:53:53 +08:00
committed by nshrivas
parent 9fa7cd067f
commit 4676e72c02
2 changed files with 26 additions and 9 deletions

View File

@@ -234,6 +234,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
for (i = 0; i < num_msdus; i++) {
uint32_t l2_hdr_offset;
struct dp_rx_desc *rx_desc = NULL;
struct rx_desc_pool *rx_desc_pool;
rx_desc = dp_rx_get_mon_desc(soc,
msdu_list.sw_cookie[i]);
@@ -260,8 +261,15 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
}
if (rx_desc->unmapped == 0) {
qdf_nbuf_unmap_single(soc->osdev, msdu,
QDF_DMA_FROM_DEVICE);
rx_desc_pool = dp_rx_get_mon_desc_pool(
soc,
mac_id,
dp_pdev->pdev_id);
qdf_nbuf_unmap_nbytes_single(
soc->osdev,
rx_desc->nbuf,
QDF_DMA_FROM_DEVICE,
rx_desc_pool->buf_size);
rx_desc->unmapped = 1;
}