aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/debug.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2008-02-04 10:03:54 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:37 -0500
commitb446197cc14ef060baeed5acbcddf148c04d03f8 (patch)
tree74fd1867ef8e31d3572b5e3b09ceeccd296376bf /drivers/net/wireless/ath5k/debug.h
parente9ddc0f25ce524d257e6cf779e495f567ed7678f (diff)
ath5k: Port debug.c over to the new band API and enable as build option
This patch finishes the port and enables debug as an build option. This was tested on: Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43) RF5112A multiband radio found (0x36) Note: For 2 GHz band on the above card I noticed we get negative channel numbers. Will look into this unless someone beats me to it. Example out put when loading using: sudo modprobe ath5k debug=0x00000400 Band 2 GHz: channels 26, rates 12 channels: 1 2412 00c0 0000 2 2417 00c0 0000 3 2422 00c0 0000 4 2427 00c0 0000 5 2432 00c0 0000 6 2437 00c0 0000 7 2442 00c0 0000 8 2447 00c0 0000 9 2452 00c0 0000 10 2457 00c0 0000 11 2462 00c0 0000 12 2467 00c0 0000 13 2472 00c0 0000 14 2484 00c0 0000 -498 2512 00c0 0000 -494 2532 00c0 0000 -490 2552 00c0 0000 -486 2572 00c0 0000 -482 2592 00c0 0000 -478 2612 00c0 0000 -474 2632 00c0 0000 -470 2652 00c0 0000 -466 2672 00c0 0000 -462 2692 00c0 0000 -458 2712 00c0 0000 -454 2732 00c0 0000 Band 5 GHz: channels 194, rates 8 channels: 27 5135 0140 0000 28 5140 0140 0000 [... etc ] 219 6095 0140 0000 220 6100 0140 0000 rates: 60 000b 0000 0000 90 000f 0000 0000 120 000a 0000 0000 180 000e 0000 0000 240 0009 0000 0000 360 000d 0000 0000 480 0008 0000 0000 540 000c 0000 0000 Changes to base.c, base.h Changes-licensed-under: 3-Clause-BSD Changes to debug.c, debug.h Changes-licensed-under: GPL Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.h')
-rw-r--r--drivers/net/wireless/ath5k/debug.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/ath5k/debug.h
index c4fd8c43df0c..16fbb6fbab35 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
69struct ath5k_softc; 64struct ath5k_softc;
70struct ath5k_hw; 65struct ath5k_hw;
71struct ieee80211_hw_mode; 66struct 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,8 +153,7 @@ void
158ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah); 153ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah);
159 154
160void 155void
161ath5k_debug_dump_modes(struct ath5k_softc *sc, 156ath5k_debug_dump_bands(struct ath5k_softc *sc);
162 struct ieee80211_hw_mode *modes);
163 157
164void 158void
165ath5k_debug_dump_skb(struct ath5k_softc *sc, 159ath5k_debug_dump_skb(struct ath5k_softc *sc,
@@ -196,8 +190,7 @@ static inline void
196ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {} 190ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {}
197 191
198static inline void 192static inline void
199ath5k_debug_dump_modes(struct ath5k_softc *sc, 193ath5k_debug_dump_bands(struct ath5k_softc *sc) {}
200 struct ieee80211_hw_mode *modes) {}
201 194
202static inline void 195static inline void
203ath5k_debug_dump_skb(struct ath5k_softc *sc, 196ath5k_debug_dump_skb(struct ath5k_softc *sc,
@@ -207,6 +200,6 @@ static inline void
207ath5k_debug_printtxbuf(struct ath5k_softc *sc, 200ath5k_debug_printtxbuf(struct ath5k_softc *sc,
208 struct ath5k_buf *bf, int done) {} 201 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 */