From 2573cf46672fe1ac84e8b84a0d0b6202658e7c30 Mon Sep 17 00:00:00 2001 From: Ajit Pal Singh Date: Fri, 21 Jun 2019 18:32:27 +0530 Subject: [PATCH] qcacmn: Do not submit RX-URBs if device suspending When WLAN device is suspended soon after driver load, the URB complete callback for prestart URBs 'may' be called, since all prestart URBs have not been utilised.In the complete callback ,fresh URBs will be requeued. Check for suspend_state before queuing URBs. Change-Id: I650080d65acde6b63340d1b90aef6d28df5022c6 CRs-Fixed: 2507594 --- hif/src/usb/usbdrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hif/src/usb/usbdrv.c b/hif/src/usb/usbdrv.c index 13ccace19b53..7e62ff6015ab 100644 --- a/hif/src/usb/usbdrv.c +++ b/hif/src/usb/usbdrv.c @@ -546,6 +546,7 @@ static void usb_hif_usb_recv_prestart_complete QDF_STATUS status = QDF_STATUS_SUCCESS; qdf_nbuf_t buf = NULL; struct HIF_USB_PIPE *pipe = urb_context->pipe; + struct hif_usb_softc *sc = HIF_GET_USB_SOFTC(pipe->device); HIF_DBG("+%s: recv pipe: %d, stat:%d,len:%d urb:0x%pK", __func__, @@ -601,7 +602,7 @@ static void usb_hif_usb_recv_prestart_complete usb_hif_cleanup_recv_urb(urb_context); /* Prestart URBs runs out and now start working receive pipe. */ - if (--pipe->urb_prestart_cnt == 0) + if ((--pipe->urb_prestart_cnt == 0) && !sc->suspend_state) usb_hif_start_recv_pipes(pipe->device); HIF_DBG("-%s", __func__);