diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-14 20:21:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-20 15:04:33 -0400 |
commit | e0d687bd9df218ba3d97aac15919d30816d72dcb (patch) | |
tree | 8a1a93dc7f940b4a0900aaa149725b535df17e25 /drivers/net/wireless/ath/ath5k/debug.h | |
parent | 491735929b63cb665b2215e3183b960e66f221f3 (diff) |
ath5k: merge ath5k_hw and ath5k_softc
Both ath5k_hw and ath5k_softc represent one instance of the hardware.
This duplication is historical and is not needed anymore.
Keep the name "ath5k_hw" for the merged structure and "ah" for the
variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more
descriptive and more widely used.
Put the combined structure to ath5k.h where the old ath5k_softc used to
be. Move some code from base.h to ath5k.h as needed.
Remove memory allocation for struct ath5k_hw and the corresponding error
handling. Merge iobase and ah_iobase fields.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.h b/drivers/net/wireless/ath/ath5k/debug.h index 193dd2d4ea3c..7f37df3125fd 100644 --- a/drivers/net/wireless/ath/ath5k/debug.h +++ b/drivers/net/wireless/ath/ath5k/debug.h | |||
@@ -61,7 +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 | struct ath5k_softc; | ||
65 | struct ath5k_hw; | 64 | struct ath5k_hw; |
66 | struct sk_buff; | 65 | struct sk_buff; |
67 | struct ath5k_buf; | 66 | struct ath5k_buf; |
@@ -127,39 +126,39 @@ enum ath5k_debug_level { | |||
127 | } while (0) | 126 | } while (0) |
128 | 127 | ||
129 | void | 128 | void |
130 | ath5k_debug_init_device(struct ath5k_softc *sc); | 129 | ath5k_debug_init_device(struct ath5k_hw *ah); |
131 | 130 | ||
132 | void | 131 | void |
133 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah); | 132 | ath5k_debug_printrxbuffs(struct ath5k_hw *ah); |
134 | 133 | ||
135 | void | 134 | void |
136 | ath5k_debug_dump_bands(struct ath5k_softc *sc); | 135 | ath5k_debug_dump_bands(struct ath5k_hw *ah); |
137 | 136 | ||
138 | void | 137 | void |
139 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf); | 138 | ath5k_debug_printtxbuf(struct ath5k_hw *ah, struct ath5k_buf *bf); |
140 | 139 | ||
141 | #else /* no debugging */ | 140 | #else /* no debugging */ |
142 | 141 | ||
143 | #include <linux/compiler.h> | 142 | #include <linux/compiler.h> |
144 | 143 | ||
145 | static inline void __attribute__ ((format (printf, 3, 4))) | 144 | static inline void __attribute__ ((format (printf, 3, 4))) |
146 | ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {} | 145 | ATH5K_DBG(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...) {} |
147 | 146 | ||
148 | static inline void __attribute__ ((format (printf, 3, 4))) | 147 | static inline void __attribute__ ((format (printf, 3, 4))) |
149 | ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) | 148 | ATH5K_DBG_UNLIMIT(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...) |
150 | {} | 149 | {} |
151 | 150 | ||
152 | static inline void | 151 | static inline void |
153 | ath5k_debug_init_device(struct ath5k_softc *sc) {} | 152 | ath5k_debug_init_device(struct ath5k_hw *ah) {} |
154 | 153 | ||
155 | static inline void | 154 | static inline void |
156 | ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {} | 155 | ath5k_debug_printrxbuffs(struct ath5k_hw *ah) {} |
157 | 156 | ||
158 | static inline void | 157 | static inline void |
159 | ath5k_debug_dump_bands(struct ath5k_softc *sc) {} | 158 | ath5k_debug_dump_bands(struct ath5k_hw *ah) {} |
160 | 159 | ||
161 | static inline void | 160 | static inline void |
162 | ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf) {} | 161 | ath5k_debug_printtxbuf(struct ath5k_hw *ah, struct ath5k_buf *bf) {} |
163 | 162 | ||
164 | #endif /* ifdef CONFIG_ATH5K_DEBUG */ | 163 | #endif /* ifdef CONFIG_ATH5K_DEBUG */ |
165 | 164 | ||