Skip to content

Commit

Permalink
mwifiex: use del_timer variant in interrupt context
Browse files Browse the repository at this point in the history
We might be in interrupt context at few places. So replace
del_timer_sync() with del_timer(). This patch fixes a kernel
trace problem seen occasionally during our testing.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Amitkumar Karwar authored and Kalle Valo committed Mar 16, 2015
1 parent b533be1 commit 6e9344f
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/mwifiex/main.c
Original file line number Diff line number Diff line change
@@ -247,7 +247,7 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
if (IS_CARD_RX_RCVD(adapter)) {
adapter->data_received = false;
adapter->pm_wakeup_fw_try = false;
del_timer_sync(&adapter->wakeup_timer);
del_timer(&adapter->wakeup_timer);
if (adapter->ps_state == PS_STATE_SLEEP)
adapter->ps_state = PS_STATE_AWAKE;
} else {
4 changes: 2 additions & 2 deletions drivers/net/wireless/mwifiex/sta_event.c
Original file line number Diff line number Diff line change
@@ -312,7 +312,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
adapter->ps_state = PS_STATE_AWAKE;
adapter->pm_wakeup_card_req = false;
adapter->pm_wakeup_fw_try = false;
del_timer_sync(&adapter->wakeup_timer);
del_timer(&adapter->wakeup_timer);
break;
}
if (!mwifiex_send_null_packet
@@ -327,7 +327,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
adapter->ps_state = PS_STATE_AWAKE;
adapter->pm_wakeup_card_req = false;
adapter->pm_wakeup_fw_try = false;
del_timer_sync(&adapter->wakeup_timer);
del_timer(&adapter->wakeup_timer);

break;

2 changes: 1 addition & 1 deletion drivers/net/wireless/mwifiex/usb.c
Original file line number Diff line number Diff line change
@@ -1006,7 +1006,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter)
{
/* Simulation of HS_AWAKE event */
adapter->pm_wakeup_fw_try = false;
del_timer_sync(&adapter->wakeup_timer);
del_timer(&adapter->wakeup_timer);
adapter->pm_wakeup_card_req = false;
adapter->ps_state = PS_STATE_AWAKE;

0 comments on commit 6e9344f

Please sign in to comment.