diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 9b20d9ee2719..7f702fe3ecc2 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2369,6 +2369,9 @@ ath5k_tx_complete_poll_work(struct work_struct *work) | |||
2369 | int i; | 2369 | int i; |
2370 | bool needreset = false; | 2370 | bool needreset = false; |
2371 | 2371 | ||
2372 | if (!test_bit(ATH_STAT_STARTED, ah->status)) | ||
2373 | return; | ||
2374 | |||
2372 | mutex_lock(&ah->lock); | 2375 | mutex_lock(&ah->lock); |
2373 | 2376 | ||
2374 | for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) { | 2377 | for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) { |
@@ -2676,6 +2679,7 @@ done: | |||
2676 | mmiowb(); | 2679 | mmiowb(); |
2677 | mutex_unlock(&ah->lock); | 2680 | mutex_unlock(&ah->lock); |
2678 | 2681 | ||
2682 | set_bit(ATH_STAT_STARTED, ah->status); | ||
2679 | ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work, | 2683 | ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work, |
2680 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); | 2684 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); |
2681 | 2685 | ||
@@ -2737,6 +2741,7 @@ void ath5k_stop(struct ieee80211_hw *hw) | |||
2737 | 2741 | ||
2738 | ath5k_stop_tasklets(ah); | 2742 | ath5k_stop_tasklets(ah); |
2739 | 2743 | ||
2744 | clear_bit(ATH_STAT_STARTED, ah->status); | ||
2740 | cancel_delayed_work_sync(&ah->tx_complete_work); | 2745 | cancel_delayed_work_sync(&ah->tx_complete_work); |
2741 | 2746 | ||
2742 | if (!ath5k_modparam_no_hw_rfkill_switch) | 2747 | if (!ath5k_modparam_no_hw_rfkill_switch) |