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
This commit is contained in:
Ajit Pal Singh 2019-06-21 18:32:27 +05:30 • committed by nshrivas
commit 2573cf4667

View file

@ -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__);