Commit db178340 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

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:

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: default avatarStanislaw Gruszka <>
Signed-off-by: default avatarJohn W. Linville <>
parent 4ef69d03
......@@ -2369,6 +2369,9 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
int i;
bool needreset = false;
if (!test_bit(ATH_STAT_STARTED, ah->status))
for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) {
......@@ -2676,6 +2679,7 @@ done:
set_bit(ATH_STAT_STARTED, ah->status);
ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work,
......@@ -2737,6 +2741,7 @@ void ath5k_stop(struct ieee80211_hw *hw)
clear_bit(ATH_STAT_STARTED, ah->status);
if (!ath5k_modparam_no_hw_rfkill_switch)
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