Commit b55d6bcf authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

ar9170: fix lockdep warning on hibernate

This patch takes care of Johannes' deadlock report by moving the
mutex_lock right after cancel_work_sync in ar9170_op_stop.

Besides, the janitor does not need to hold the mutex anymore,
so this extra lines can be removed as well.
Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2431fe9a
...@@ -343,7 +343,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work) ...@@ -343,7 +343,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work)
if (unlikely(!IS_STARTED(ar))) if (unlikely(!IS_STARTED(ar)))
return ; return ;
mutex_lock(&ar->mutex);
/* recycle the garbage back to mac80211... one by one. */ /* recycle the garbage back to mac80211... one by one. */
while ((skb = skb_dequeue(&ar->global_tx_status_waste))) { while ((skb = skb_dequeue(&ar->global_tx_status_waste))) {
#ifdef AR9170_QUEUE_DEBUG #ifdef AR9170_QUEUE_DEBUG
...@@ -369,8 +368,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work) ...@@ -369,8 +368,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work)
if (skb_queue_len(&ar->global_tx_status_waste) > 0) if (skb_queue_len(&ar->global_tx_status_waste) > 0)
queue_delayed_work(ar->hw->workqueue, &ar->tx_status_janitor, queue_delayed_work(ar->hw->workqueue, &ar->tx_status_janitor,
msecs_to_jiffies(100)); msecs_to_jiffies(100));
mutex_unlock(&ar->mutex);
} }
static void ar9170_handle_command_response(struct ar9170 *ar, static void ar9170_handle_command_response(struct ar9170 *ar,
...@@ -1013,10 +1010,10 @@ static void ar9170_op_stop(struct ieee80211_hw *hw) ...@@ -1013,10 +1010,10 @@ static void ar9170_op_stop(struct ieee80211_hw *hw)
flush_workqueue(ar->hw->workqueue); flush_workqueue(ar->hw->workqueue);
mutex_lock(&ar->mutex);
cancel_delayed_work_sync(&ar->tx_status_janitor); cancel_delayed_work_sync(&ar->tx_status_janitor);
cancel_work_sync(&ar->filter_config_work); cancel_work_sync(&ar->filter_config_work);
cancel_work_sync(&ar->beacon_work); cancel_work_sync(&ar->beacon_work);
mutex_lock(&ar->mutex);
skb_queue_purge(&ar->global_tx_status_waste); skb_queue_purge(&ar->global_tx_status_waste);
skb_queue_purge(&ar->global_tx_status); skb_queue_purge(&ar->global_tx_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment