Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58b70335 authored by Brian Norris's avatar Brian Norris Committed by Kalle Valo
Browse files

mwifiex: usb: handle HS failures



SDIO and PCIe drivers handle this. Let's imitate it.

Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarXinming Hu <huxm@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent bcf28a2f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -521,7 +521,14 @@ static int mwifiex_usb_suspend(struct usb_interface *intf, pm_message_t message)
		mwifiex_dbg(adapter, WARN,
			    "Device already suspended\n");

	mwifiex_enable_hs(adapter);
	/* Enable the Host Sleep */
	if (!mwifiex_enable_hs(adapter)) {
		mwifiex_dbg(adapter, ERROR,
			    "cmd: failed to suspend\n");
		adapter->hs_enabling = false;
		return -EFAULT;
	}


	/* 'is_suspended' flag indicates device is suspended.
	 * It must be set here before the usb_kill_urb() calls. Reason