diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-05-23 14:31:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-03 14:05:15 -0400 |
commit | b55d6bcf9b7082ae613e5d532608abcd409164ca (patch) | |
tree | 43c0240aaa07bc53089b01dfcfd0d86afd0efa14 /drivers/net/wireless/ath/ar9170 | |
parent | 2431fe9a4b43ccf03589fa661662da6bfbd97282 (diff) |
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: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 1657e891a6a7..63528f1b8d0e 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -343,7 +343,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work) | |||
343 | if (unlikely(!IS_STARTED(ar))) | 343 | if (unlikely(!IS_STARTED(ar))) |
344 | return ; | 344 | return ; |
345 | 345 | ||
346 | mutex_lock(&ar->mutex); | ||
347 | /* recycle the garbage back to mac80211... one by one. */ | 346 | /* recycle the garbage back to mac80211... one by one. */ |
348 | while ((skb = skb_dequeue(&ar->global_tx_status_waste))) { | 347 | while ((skb = skb_dequeue(&ar->global_tx_status_waste))) { |
349 | #ifdef AR9170_QUEUE_DEBUG | 348 | #ifdef AR9170_QUEUE_DEBUG |
@@ -369,8 +368,6 @@ static void ar9170_tx_status_janitor(struct work_struct *work) | |||
369 | if (skb_queue_len(&ar->global_tx_status_waste) > 0) | 368 | if (skb_queue_len(&ar->global_tx_status_waste) > 0) |
370 | queue_delayed_work(ar->hw->workqueue, &ar->tx_status_janitor, | 369 | queue_delayed_work(ar->hw->workqueue, &ar->tx_status_janitor, |
371 | msecs_to_jiffies(100)); | 370 | msecs_to_jiffies(100)); |
372 | |||
373 | mutex_unlock(&ar->mutex); | ||
374 | } | 371 | } |
375 | 372 | ||
376 | static void ar9170_handle_command_response(struct ar9170 *ar, | 373 | static void ar9170_handle_command_response(struct ar9170 *ar, |
@@ -1013,10 +1010,10 @@ static void ar9170_op_stop(struct ieee80211_hw *hw) | |||
1013 | 1010 | ||
1014 | flush_workqueue(ar->hw->workqueue); | 1011 | flush_workqueue(ar->hw->workqueue); |
1015 | 1012 | ||
1016 | mutex_lock(&ar->mutex); | ||
1017 | cancel_delayed_work_sync(&ar->tx_status_janitor); | 1013 | cancel_delayed_work_sync(&ar->tx_status_janitor); |
1018 | cancel_work_sync(&ar->filter_config_work); | 1014 | cancel_work_sync(&ar->filter_config_work); |
1019 | cancel_work_sync(&ar->beacon_work); | 1015 | cancel_work_sync(&ar->beacon_work); |
1016 | mutex_lock(&ar->mutex); | ||
1020 | skb_queue_purge(&ar->global_tx_status_waste); | 1017 | skb_queue_purge(&ar->global_tx_status_waste); |
1021 | skb_queue_purge(&ar->global_tx_status); | 1018 | skb_queue_purge(&ar->global_tx_status); |
1022 | 1019 | ||