Skip to content

Commit db17834

Browse files
Stanislaw Gruszkalinvjw
authored andcommitted
ath5k: do not reschedule tx_complete_work on stop
This patch claim to fix "WARNING: at net/mac80211/util.c:599 ieee80211_can_queue_work.isra.7+0x30/0x40", which was reported at: https://bugzilla.redhat.com/show_bug.cgi?id=922295 We use ATH_STAT_STARTED flag to disallow to perform ath5k_tx_complete_poll_work() code, hence reschedule ah->tx_complete_work, when we stop device. This flag was defined in ath5k code, but it was not used. I didn't get feedback if the fix works, so patch is compile only tested. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 4ef69d0 commit db17834

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • drivers/net/wireless/ath/ath5k

‎drivers/net/wireless/ath/ath5k/base.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,9 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
23692369
int i;
23702370
bool needreset = false;
23712371

2372+
if (!test_bit(ATH_STAT_STARTED, ah->status))
2373+
return;
2374+
23722375
mutex_lock(&ah->lock);
23732376

23742377
for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) {
@@ -2676,6 +2679,7 @@ int ath5k_start(struct ieee80211_hw *hw)
26762679
mmiowb();
26772680
mutex_unlock(&ah->lock);
26782681

2682+
set_bit(ATH_STAT_STARTED, ah->status);
26792683
ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work,
26802684
msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT));
26812685

@@ -2737,6 +2741,7 @@ void ath5k_stop(struct ieee80211_hw *hw)
27372741

27382742
ath5k_stop_tasklets(ah);
27392743

2744+
clear_bit(ATH_STAT_STARTED, ah->status);
27402745
cancel_delayed_work_sync(&ah->tx_complete_work);
27412746

27422747
if (!ath5k_modparam_no_hw_rfkill_switch)

0 commit comments

Comments
 (0)