aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2012-11-01 18:44:14 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:55:37 -0500
commitd31ab3577eca0f74126ceb1d406710e620a155a0 (patch)
tree876368d0dd6f1ad002595a0b2e27e06d8826fa93 /drivers/net/wireless/mwifiex/cmdevt.c
parentb2cb1a900a104642401faea7bada3c48289402f4 (diff)
mwifiex: add support for SDIO card reset
When command timeout happens due to a bug in firmware/hardware, the timeout handler just prints some debug information. User is unable to reload the driver in this case. Inspired by 9a821f5 "libertas: add sd8686 reset_card support", this patch adds card reset support for SDIO interface when command timeout happens. If the SDIO host contoller supports MMC_POWER_OFF|UP|ON operations, the chip will be reset and the firmware will be re-downloaded. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index da6c49177fc..c9528b3e9e9 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -944,6 +944,9 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
}
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
mwifiex_init_fw_complete(adapter);
+
+ if (adapter->if_ops.card_reset)
+ adapter->if_ops.card_reset(adapter);
}
/*