From ebc085458b2e0e79a33370a35e9e77602c6df0d0 Mon Sep 17 00:00:00 2001 From: chenguo Date: Tue, 19 Sep 2017 16:27:24 +0800 Subject: [PATCH] qcacmn: Fix RX dead loop for SDIO WLAN There is a dead loop when nbuf allocation failed for SDIO WLAN. Do not change the status back to OK when E_RESOURCE is triggered. CRs-Fixed: 2112323 Change-Id: I50b8fff99707cdccb1e5e837558131d6777ec9c0 --- hif/src/sdio/hif_sdio_recv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hif/src/sdio/hif_sdio_recv.c b/hif/src/sdio/hif_sdio_recv.c index ce7666cc34d3..2f81932a4c78 100644 --- a/hif/src/sdio/hif_sdio_recv.c +++ b/hif/src/sdio/hif_sdio_recv.c @@ -283,10 +283,6 @@ QDF_STATUS hif_dev_alloc_and_prepare_rx_packets(struct hif_sdio_device *pdev, } if (QDF_IS_STATUS_ERROR(status)) { - if (QDF_STATUS_E_RESOURCES == status) { - /* this is actually okay */ - status = QDF_STATUS_SUCCESS; - } break; } @@ -294,7 +290,9 @@ QDF_STATUS hif_dev_alloc_and_prepare_rx_packets(struct hif_sdio_device *pdev, UNLOCK_HIF_DEV_RX(pdev); - if (QDF_IS_STATUS_ERROR(status)) { + /* for NO RESOURCE error, no need to flush data queue */ + if (QDF_IS_STATUS_ERROR(status) + && (status != QDF_STATUS_E_RESOURCES)) { while (!HTC_QUEUE_EMPTY(queue)) packet = htc_packet_dequeue(queue); }