diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath5k/debug.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/ath5k/debug.h index c4fd8c43df0c..2cf8d18b10e3 100644 --- a/drivers/net/wireless/ath5k/debug.h +++ b/drivers/net/wireless/ath5k/debug.h | |||
@@ -61,11 +61,6 @@ | |||
61 | #ifndef _ATH5K_DEBUG_H | 61 | #ifndef _ATH5K_DEBUG_H |
62 | #define _ATH5K_DEBUG_H | 62 | #define _ATH5K_DEBUG_H |
63 | 63 | ||
64 | /* set this to 1 for debugging output */ | ||
65 | #ifndef ATH5K_DEBUG | ||
66 | #define ATH5K_DEBUG 0 | ||
67 | #endif | ||
68 | |||
69 | struct ath5k_softc; | 64 | struct ath5k_softc; |
70 | struct ath5k_hw; | 65 | struct ath5k_hw; |
71 | struct ieee80211_hw_mode; | 66 | struct ieee80211_hw_mode; |
@@ -96,7 +91,7 @@ struct ath5k_dbg_info { | |||
96 | * @ATH5K_DEBUG_LED: led management | 91 | * @ATH5K_DEBUG_LED: led management |
97 | * @ATH5K_DEBUG_DUMP_RX: print received skb content | 92 | * @ATH5K_DEBUG_DUMP_RX: print received skb content |
98 | * @ATH5K_DEBUG_DUMP_TX: print transmit skb content | 93 | * @ATH5K_DEBUG_DUMP_TX: print transmit skb content |
99 | * @ATH5K_DEBUG_DUMPMODES: dump modes | 94 | * @ATH5K_DEBUG_DUMPBANDS: dump bands |
100 | * @ATH5K_DEBUG_TRACE: trace function calls | 95 | * @ATH5K_DEBUG_TRACE: trace function calls |
101 | * @ATH5K_DEBUG_ANY: show at any debug level | 96 | * @ATH5K_DEBUG_ANY: show at any debug level |
102 | * | 97 | * |
@@ -118,12 +113,12 @@ enum ath5k_debug_level { | |||
118 | ATH5K_DEBUG_LED = 0x00000080, | 113 | ATH5K_DEBUG_LED = 0x00000080, |
119 | ATH5K_DEBUG_DUMP_RX = 0x00000100, | 114 | ATH5K_DEBUG_DUMP_RX = 0x00000100, |
120 | ATH5K_DEBUG_DUMP_TX = 0x00000200, | 115 | ATH5K_DEBUG_DUMP_TX = 0x00000200, |
121 | ATH5K_DEBUG_DUMPMODES = 0x00000400, | 116 | ATH5K_DEBUG_DUMPBANDS = 0x00000400, |
122 | ATH5K_DEBUG_TRACE = 0x00001000, | 117 | ATH5K_DEBUG_TRACE = 0x00001000, |
123 | ATH5K_DEBUG_ANY = 0xffffffff | 118 | ATH5K_DEBUG_ANY = 0xffffffff |
124 | }; | 119 | }; |
125 | 120 | ||
126 | #if ATH5K_DEBUG | 121 | #ifdef CONFIG_ATH5K_DEBUG |
127 | 122 | ||
128 | #define ATH5K_TRACE(_sc) do { \ | 123 | #define ATH5K_TRACE(_sc) do { \ |
129 | if (unlikely((_sc)->debug.level & ATH5K_DEBUG_TRACE)) \ | 124 | if (unlikely((_sc)->debug.level & ATH5K_DEBUG_TRACE)) \ |
@@ -158,20 +153,20 @@ void | |||
158 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah); | 153 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah); |
159 | 154 | ||
160 | void | 155 | void |
161 | ath5k_debug_dump_modes(struct ath5k_softc *sc, | 156 | ath5k_debug_dump_bands(struct ath5k_softc *sc); |
162 | struct ieee80211_hw_mode *modes); | ||
163 | 157 | ||
164 | void | 158 | void |
165 | ath5k_debug_dump_skb(struct ath5k_softc *sc, | 159 | ath5k_debug_dump_skb(struct ath5k_softc *sc, |
166 | struct sk_buff *skb, const char *prefix, int tx); | 160 | struct sk_buff *skb, const char *prefix, int tx); |
167 | 161 | ||
168 | void | 162 | void |
169 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, | 163 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf); |
170 | struct ath5k_buf *bf, int done); | ||
171 | 164 | ||
172 | #else /* no debugging */ | 165 | #else /* no debugging */ |
173 | 166 | ||
174 | #define ATH5K_TRACE(_sc) /* empty */ | 167 | #include <linux/compiler.h> |
168 | |||
169 | #define ATH5K_TRACE(_sc) typecheck(struct ath5k_softc *, (_sc)) | ||
175 | 170 | ||
176 | static inline void __attribute__ ((format (printf, 3, 4))) | 171 | static inline void __attribute__ ((format (printf, 3, 4))) |
177 | ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {} | 172 | ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {} |
@@ -196,17 +191,15 @@ static inline void | |||
196 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {} | 191 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {} |
197 | 192 | ||
198 | static inline void | 193 | static inline void |
199 | ath5k_debug_dump_modes(struct ath5k_softc *sc, | 194 | ath5k_debug_dump_bands(struct ath5k_softc *sc) {} |
200 | struct ieee80211_hw_mode *modes) {} | ||
201 | 195 | ||
202 | static inline void | 196 | static inline void |
203 | ath5k_debug_dump_skb(struct ath5k_softc *sc, | 197 | ath5k_debug_dump_skb(struct ath5k_softc *sc, |
204 | struct sk_buff *skb, const char *prefix, int tx) {} | 198 | struct sk_buff *skb, const char *prefix, int tx) {} |
205 | 199 | ||
206 | static inline void | 200 | static inline void |
207 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, | 201 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf) {} |
208 | struct ath5k_buf *bf, int done) {} | ||
209 | 202 | ||
210 | #endif /* if ATH5K_DEBUG */ | 203 | #endif /* ifdef CONFIG_ATH5K_DEBUG */ |
211 | 204 | ||
212 | #endif /* ifndef _ATH5K_DEBUG_H */ | 205 | #endif /* ifndef _ATH5K_DEBUG_H */ |