From 0bb59b225fdb5c19f2fba02e3f52e2ee78752d15 Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Fri, 31 May 2019 16:11:19 +0530 Subject: [PATCH] qcacmn: Do not try to alloc memory again when qdf_nuf_alloc fails Do not try to allocate the memory again when qdf_nbuf_alloc fails in dp_rx_buffers_replenish(). Change-Id: Iafbe10021bf9f53d93a20d4c8e9543ca6f8aff8a CRs-Fixed: 2463258 --- dp/wifi3.0/dp_rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index 6e2fa9749728..a8be17349a62 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -184,7 +184,7 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id, if (qdf_unlikely(!rx_netbuf)) { DP_STATS_INC(dp_pdev, replenish.nbuf_alloc_fail, 1); - continue; + break; } ret = qdf_nbuf_map_single(dp_soc->osdev, rx_netbuf, @@ -241,10 +241,10 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id, hal_srng_access_end(dp_soc->hal_soc, rxdma_srng); dp_verbose_debug("replenished buffers %d, rx desc added back to free list %u", - num_req_buffers, num_desc_to_free); + count, num_desc_to_free); - DP_STATS_INC_PKT(dp_pdev, replenish.pkts, num_req_buffers, - (RX_BUFFER_SIZE * num_req_buffers)); + DP_STATS_INC_PKT(dp_pdev, replenish.pkts, count, + (RX_BUFFER_SIZE * count)); free_descs: DP_STATS_INC(dp_pdev, buf_freelist, num_desc_to_free);