diff options
author | Brian Norris <briannorris@chromium.org> | 2016-11-18 15:00:31 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-19 08:18:51 +0100 |
commit | 58b7033551cd0137f879c5828f84f54ecb0f9090 (patch) | |
tree | b5c64d24f81b327dae35351bac892a49bce032ff /drivers/net | |
parent | mwifiex: reset card->adapter during device unregister (diff) | |
download | linux-58b7033551cd0137f879c5828f84f54ecb0f9090.tar.xz linux-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')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/usb.c | 9 |
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 |