diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-02-28 07:35:15 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-28 23:33:46 +0400 |
commit | 38ec3f3f6142d1517ce0f1c96502fd1c05d2fc52 (patch) | |
tree | 467925aaa5616dfb20f9b01b146f01ec7fbad243 /drivers | |
parent | af1fa210f4fc6e304b859b386a3c8a266b1110ab (diff) | |
download | linux-38ec3f3f6142d1517ce0f1c96502fd1c05d2fc52.tar.xz |
mwifiex: block further commands after timeout
This patch adds a check in command preparation routine.
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')
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index 0958764d2bae..83195d96e78c 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c @@ -514,6 +514,11 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no, return -1; } + if (adapter->num_cmd_timeout) { + dev_err(adapter->dev, "PREP_CMD: FW is in bad state\n"); + return -1; + } + if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET) { if (cmd_no != HostCmd_CMD_FUNC_INIT) { dev_err(adapter->dev, "PREP_CMD: FW in reset state\n"); |