aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2016-11-18 19:30:31 +0530
committerKalle Valo <kvalo@codeaurora.org>2016-11-19 09:18:51 +0200
commit58b7033551cd0137f879c5828f84f54ecb0f9090 (patch)
treeb5c64d24f81b327dae35351bac892a49bce032ff /drivers/net/wireless/marvell
parentmwifiex: reset card->adapter during device unregister (diff)
downloadlinux-dev-58b7033551cd0137f879c5828f84f54ecb0f9090.tar.xz
linux-dev-58b7033551cd0137f879c5828f84f54ecb0f9090.zip
mwifiex: usb: handle HS failures
SDIO and PCIe drivers handle this. Let's imitate it. Signed-off-by: Brian Norris <briannorris@chromium.org> Tested-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/usb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index 64a40205201d..55e3a01ccc30 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -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