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>
This commit is contained in:
committed by
John W. Linville
parent
ff8f59b5bb
commit
66e3547431
@@ -1218,6 +1218,11 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
u8 cmd_rsp;
|
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);
|
mutex_lock(&priv->mutex);
|
||||||
|
|
||||||
if (priv->op_flags & OP_INVALID) {
|
if (priv->op_flags & OP_INVALID) {
|
||||||
@@ -1226,11 +1231,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
|
|||||||
return;
|
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);
|
ath9k_htc_ps_wakeup(priv);
|
||||||
htc_stop(priv->htc);
|
htc_stop(priv->htc);
|
||||||
WMI_CMD(WMI_DISABLE_INTR_CMDID);
|
WMI_CMD(WMI_DISABLE_INTR_CMDID);
|
||||||
|
Reference in New Issue
Block a user