summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan2010-12-28 09:58:14 +0100
committerJohn W. Linville2011-01-04 20:43:00 +0100
commit66e3547431a8738416b508badfb9f326d11dabcc (patch)
treebf90a911643b73072ffdb5e3e09d75804812728c
parentath9k_htc: Handle pending URBs properly (diff)
downloadkernel-qcow2-linux-66e3547431a8738416b508badfb9f326d11dabcc.tar.gz
kernel-qcow2-linux-66e3547431a8738416b508badfb9f326d11dabcc.tar.xz
kernel-qcow2-linux-66e3547431a8738416b508badfb9f326d11dabcc.zip
ath9k_htc: Move work cancellation outside of mutex
There is no need to lock the various work cancellation calls. This will be helpful when handling FATAL events. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index dd17909bd903..5f75f70db5a7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1218,6 +1218,11 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
int ret = 0;
u8 cmd_rsp;
+ /* Cancel all the running timers/work .. */
+ cancel_work_sync(&priv->ps_work);
+ cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
+ ath9k_led_stop_brightness(priv);
+
mutex_lock(&priv->mutex);
if (priv->op_flags & OP_INVALID) {
@@ -1226,11 +1231,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
return;
}
- /* Cancel all the running timers/work .. */
- cancel_work_sync(&priv->ps_work);
- cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
- ath9k_led_stop_brightness(priv);
-
ath9k_htc_ps_wakeup(priv);
htc_stop(priv->htc);
WMI_CMD(WMI_DISABLE_INTR_CMDID);