qcacmn: Fix nbuf free without unmap

While processing monitor status srng when DMA is not done
for current peeked HP+1 and DMA is done for HP+2 then nbuf
at HP+1 is freed without processing. But nbuf should be unmapped
before freeing. So unmap nbuf then proceed for freeing.

Change-Id: I9e808a7c9b6452d6b6e1fddc49fb08871c8c90f9
CRs-Fixed: 2785364
This commit is contained in:
Karthik Kantamneni 2020-09-26 20:55:36 +05:30 • committed by snandini
commit a0039f649f

View file

@ -1988,6 +1988,10 @@ dp_rx_mon_status_srng_process(struct dp_soc *soc, struct dp_intr *int_ctx,
if (reap_status == DP_MON_STATUS_NO_DMA)
continue;
else if (reap_status == DP_MON_STATUS_REPLENISH) {
qdf_nbuf_unmap_nbytes_single(
soc->osdev, status_nbuf,
QDF_DMA_FROM_DEVICE,
rx_desc_pool->buf_size);
qdf_nbuf_free(status_nbuf);
goto buf_replenish;
}