aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath.h
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-03-08 13:20:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:19:36 -0400
commit98b36a029550def4b3e76cc44d4345bf20a729bd (patch)
tree587283350b0b82234768d059645748610c7bc064 /drivers/net/wireless/ath/ath.h
parent4e13f092f755df5ed8169c8d8bfb952dc057e1aa (diff)
ath9k: Add wiphy name to log messages.
On systems with multiple NICs, it's nice to know which one is producing warnings. Here is an example of the new ouput: ath: wiphy0: Failed to stop TX DMA, queues=0x005! Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath.h')
-rw-r--r--drivers/net/wireless/ath/ath.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index efc01110dc34..c54b7d37bff1 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -174,28 +174,24 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry);
174void ath_hw_cycle_counters_update(struct ath_common *common); 174void ath_hw_cycle_counters_update(struct ath_common *common);
175int32_t ath_hw_get_listen_time(struct ath_common *common); 175int32_t ath_hw_get_listen_time(struct ath_common *common);
176 176
177extern __printf(2, 3) void ath_printk(const char *level, const char *fmt, ...); 177__printf(3, 4)
178 178void ath_printk(const char *level, const struct ath_common *common,
179#define _ath_printk(level, common, fmt, ...) \ 179 const char *fmt, ...);
180do { \
181 __always_unused struct ath_common *unused = common; \
182 ath_printk(level, fmt, ##__VA_ARGS__); \
183} while (0)
184 180
185#define ath_emerg(common, fmt, ...) \ 181#define ath_emerg(common, fmt, ...) \
186 _ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__) 182 ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__)
187#define ath_alert(common, fmt, ...) \ 183#define ath_alert(common, fmt, ...) \
188 _ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__) 184 ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__)
189#define ath_crit(common, fmt, ...) \ 185#define ath_crit(common, fmt, ...) \
190 _ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__) 186 ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__)
191#define ath_err(common, fmt, ...) \ 187#define ath_err(common, fmt, ...) \
192 _ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__) 188 ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__)
193#define ath_warn(common, fmt, ...) \ 189#define ath_warn(common, fmt, ...) \
194 _ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__) 190 ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__)
195#define ath_notice(common, fmt, ...) \ 191#define ath_notice(common, fmt, ...) \
196 _ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__) 192 ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__)
197#define ath_info(common, fmt, ...) \ 193#define ath_info(common, fmt, ...) \
198 _ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__) 194 ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__)
199 195
200/** 196/**
201 * enum ath_debug_level - atheros wireless debug level 197 * enum ath_debug_level - atheros wireless debug level
@@ -256,7 +252,7 @@ enum ATH_DEBUG {
256#define ath_dbg(common, dbg_mask, fmt, ...) \ 252#define ath_dbg(common, dbg_mask, fmt, ...) \
257do { \ 253do { \
258 if ((common)->debug_mask & ATH_DBG_##dbg_mask) \ 254 if ((common)->debug_mask & ATH_DBG_##dbg_mask) \
259 _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ 255 ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \
260} while (0) 256} while (0)
261 257
262#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) 258#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)