summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-03-26 03:01:20 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-03-27 19:20:06 +0100
commitc0dbba6688b0acd582b7d6d59574fdf50f950981 (patch)
treec58f3e399f7fbc522acbb5aba7aae40a6caa79fe /drivers/net/wireless/mwifiex/cmdevt.c
parentmwifiex: correction in sleep confirm command sequence number (diff)
downloadlinux-c0dbba6688b0acd582b7d6d59574fdf50f950981.tar.xz
linux-c0dbba6688b0acd582b7d6d59574fdf50f950981.zip
mwifiex: cancel pending commands during host sleep
Sometimes we may end up downloading other commands when host sleep is configured. This patch makes sure that pending commands are cancelled and we stop queueing further commands during host sleep. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index cc81fcd35959..a23791d49955 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -509,6 +509,11 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
return -1;
}
+ if (adapter->hs_enabling && cmd_no != HostCmd_CMD_802_11_HS_CFG_ENH) {
+ dev_err(adapter->dev, "PREP_CMD: host entering sleep state\n");
+ return -1;
+ }
+
if (adapter->surprise_removed) {
dev_err(adapter->dev, "PREP_CMD: card is removed\n");
return -1;