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>
This commit is contained in:
Amitkumar Karwar 2014-02-27 19:35:15 -08:00 committed by John W. Linville
parent af1fa210f4
commit 38ec3f3f61
1 changed files with 5 additions and 0 deletions

View File

@ -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");