diff options
author | Mohammed Shafi Shajakhan <mshajakhan@atheros.com> | 2011-05-06 11:13:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-10 15:46:58 -0400 |
commit | 99aa55b66e3553e6f7212ec1104e0fac06cc558e (patch) | |
tree | 8e81d3925d3f9dcd22589c10902d0c2afbdc4054 /drivers | |
parent | 5db1c07ced19b2eec3a149a3c624d88e02e246ae (diff) |
ath9k: Fix a warning due to a queued work during S3 state
during suspend/S3 state drv_flush is called from mac80211 irrespective of
interface count. In ath9k we queue a work in ath9k_flush which we expect
to be cancelled in the drv_stop call back. during suspend process mac80211
calls drv_stop only when the interface count(local->count) is non-zero.
unfortunately when the network manager is enabled, drv_flush is called
while drv_stop is not called as local->count reaches '0'.
So fix this by simply checking for the device presence in the
drv_flush call back in the driver before queueing work or anything else.
this patch fixes the following WARNING
Call Trace:
[<c014c6e2>] warn_slowpath_common+0x72/0xa0
[<fc133f99>] ? ieee80211_can_queue_work+0x39/0x50 [mac80211]
[<fc133f99>] ? ieee80211_can_queue_work+0x39/0x50 [mac80211]
[<c014c75b>] warn_slowpath_fmt+0x2b/0x30
[<fc133f99>] ieee80211_can_queue_work+0x39/0x50 [mac80211]
[<fc134ed1>] ieee80211_queue_delayed_work+0x21/0x50 [mac80211]
[<fc1e5b22>] ath_tx_complete_poll_work+0xb2/0x100 [ath9k]
[<c016399e>] run_workqueue+0x8e/0x150
[<fc1e5a70>] ? ath_tx_complete_poll_work+0x0/0x100 [ath9k]
[<c0163ae4>] worker_thread+0x84/0xe0
[<c0167a60>] ? autoremove_wake_function+0x0/0x50
[<c0163a60>] ? worker_thread+0x0/0xe0
[<c01677d4>] kthread+0x74/0x80
[<c0167760>] ? kthread+0x0/0x80
[<c0104087>] kernel_thread_helper+0x7/0x10
---[ end trace 2aff81010df9215b ]---
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 17d04ff8d678..1482fa650833 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2141,6 +2141,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | 2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) |
2142 | { | 2142 | { |
2143 | struct ath_softc *sc = hw->priv; | 2143 | struct ath_softc *sc = hw->priv; |
2144 | struct ath_hw *ah = sc->sc_ah; | ||
2145 | struct ath_common *common = ath9k_hw_common(ah); | ||
2144 | int timeout = 200; /* ms */ | 2146 | int timeout = 200; /* ms */ |
2145 | int i, j; | 2147 | int i, j; |
2146 | 2148 | ||
@@ -2149,6 +2151,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2149 | 2151 | ||
2150 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2152 | cancel_delayed_work_sync(&sc->tx_complete_work); |
2151 | 2153 | ||
2154 | if (sc->sc_flags & SC_OP_INVALID) { | ||
2155 | ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); | ||
2156 | mutex_unlock(&sc->mutex); | ||
2157 | return; | ||
2158 | } | ||
2159 | |||
2152 | if (drop) | 2160 | if (drop) |
2153 | timeout = 1; | 2161 | timeout = 1; |
2154 | 2162 | ||