diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-07-17 07:46:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-17 15:11:40 -0400 |
commit | 124b979baeb2d7a0593be8d392f43725578478c1 (patch) | |
tree | 3b6f3d1d1915f3dba8f2405a8e79f1bf7958b22e /drivers/net/wireless/ath/ath9k/debug.h | |
parent | 6dcc344469d60a1f0d72cc638967e8c83c6e166e (diff) |
ath9k: Fix race in reset-work usage
Using work_pending() to defer certain operations when
a HW-reset work has been queued is racy since the check
would return false when the work item is actually in
execution. Use SC_OP_HW_RESET instead to fix this race.
Also, unify the reset debug statistics maintenance.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index d0f851cea43a..8b9d080d89da 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -32,6 +32,19 @@ struct ath_buf; | |||
32 | #define RESET_STAT_INC(sc, type) do { } while (0) | 32 | #define RESET_STAT_INC(sc, type) do { } while (0) |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | enum ath_reset_type { | ||
36 | RESET_TYPE_BB_HANG, | ||
37 | RESET_TYPE_BB_WATCHDOG, | ||
38 | RESET_TYPE_FATAL_INT, | ||
39 | RESET_TYPE_TX_ERROR, | ||
40 | RESET_TYPE_TX_HANG, | ||
41 | RESET_TYPE_PLL_HANG, | ||
42 | RESET_TYPE_MAC_HANG, | ||
43 | RESET_TYPE_BEACON_STUCK, | ||
44 | RESET_TYPE_MCI, | ||
45 | __RESET_TYPE_MAX | ||
46 | }; | ||
47 | |||
35 | #ifdef CONFIG_ATH9K_DEBUGFS | 48 | #ifdef CONFIG_ATH9K_DEBUGFS |
36 | 49 | ||
37 | /** | 50 | /** |
@@ -209,17 +222,6 @@ struct ath_rx_stats { | |||
209 | u32 rx_frags; | 222 | u32 rx_frags; |
210 | }; | 223 | }; |
211 | 224 | ||
212 | enum ath_reset_type { | ||
213 | RESET_TYPE_BB_HANG, | ||
214 | RESET_TYPE_BB_WATCHDOG, | ||
215 | RESET_TYPE_FATAL_INT, | ||
216 | RESET_TYPE_TX_ERROR, | ||
217 | RESET_TYPE_TX_HANG, | ||
218 | RESET_TYPE_PLL_HANG, | ||
219 | RESET_TYPE_MAC_HANG, | ||
220 | __RESET_TYPE_MAX | ||
221 | }; | ||
222 | |||
223 | struct ath_stats { | 225 | struct ath_stats { |
224 | struct ath_interrupt_stats istats; | 226 | struct ath_interrupt_stats istats; |
225 | struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; | 227 | struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; |