diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-12-31 02:36:41 -0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-06 21:19:44 +0200 |
commit | 4636187da60b6e33526050235c610409d9cc00e8 (patch) | |
tree | e1bd810c8f421db9e787b2399f0288412bd92f6b /drivers/net/wireless/mwifiex/main.c | |
parent | b4f1b177be27103cd84a3692ae71bf857700e27f (diff) |
mwifiex: add wakeup timer based recovery mechanism
If host fails to wakeup the firmware, we will trigger card reset
after 3 second timeout.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 2d4047f4be1..119e87574e8 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -237,6 +237,7 @@ process_start: (is_command_pending(adapter) || !mwifiex_wmm_lists_empty(adapter))) { adapter->pm_wakeup_fw_try = true; + mod_timer(&adapter->wakeup_timer, jiffies + (HZ*3)); adapter->if_ops.wakeup(adapter); continue; } @@ -244,6 +245,7 @@ process_start: if (IS_CARD_RX_RCVD(adapter)) { adapter->data_received = false; adapter->pm_wakeup_fw_try = false; + del_timer_sync(&adapter->wakeup_timer); if (adapter->ps_state == PS_STATE_SLEEP) adapter->ps_state = PS_STATE_AWAKE; } else { |