diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h index 9dc39754a35f..872a8ce5d8f3 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.h +++ b/drivers/net/wireless/ath/ath6kl/debug.h | |||
@@ -60,28 +60,11 @@ enum ath6kl_war { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | #ifdef CONFIG_ATH6KL_DEBUG | 62 | #ifdef CONFIG_ATH6KL_DEBUG |
63 | #define ath6kl_dbg(mask, fmt, ...) \ | ||
64 | ({ \ | ||
65 | int rtn; \ | ||
66 | if (debug_mask & mask) \ | ||
67 | rtn = ath6kl_printk(KERN_DEBUG, fmt, ##__VA_ARGS__); \ | ||
68 | else \ | ||
69 | rtn = 0; \ | ||
70 | \ | ||
71 | rtn; \ | ||
72 | }) | ||
73 | 63 | ||
74 | static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, | 64 | void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...); |
75 | const char *msg, const char *prefix, | 65 | void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, |
76 | const void *buf, size_t len) | 66 | const char *msg, const char *prefix, |
77 | { | 67 | const void *buf, size_t len); |
78 | if (debug_mask & mask) { | ||
79 | if (msg) | ||
80 | ath6kl_dbg(mask, "%s\n", msg); | ||
81 | |||
82 | print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); | ||
83 | } | ||
84 | } | ||
85 | 68 | ||
86 | void ath6kl_dump_registers(struct ath6kl_device *dev, | 69 | void ath6kl_dump_registers(struct ath6kl_device *dev, |
87 | struct ath6kl_irq_proc_registers *irq_proc_reg, | 70 | struct ath6kl_irq_proc_registers *irq_proc_reg, |