diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-debug.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-debug.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h index f853c6b9f76e..28ecfe8d39a3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h | |||
@@ -40,6 +40,15 @@ do { if (iwl3945_debug_level & (level)) \ | |||
40 | do { if ((iwl3945_debug_level & (level)) && net_ratelimit()) \ | 40 | do { if ((iwl3945_debug_level & (level)) && net_ratelimit()) \ |
41 | printk(KERN_ERR DRV_NAME": %c %s " fmt, \ | 41 | printk(KERN_ERR DRV_NAME": %c %s " fmt, \ |
42 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 42 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) |
43 | |||
44 | static inline void iwl3945_print_hex_dump(int level, void *p, u32 len) | ||
45 | { | ||
46 | if (!(iwl3945_debug_level & level)) | ||
47 | return; | ||
48 | |||
49 | print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1, | ||
50 | p, len, 1); | ||
51 | } | ||
43 | #else | 52 | #else |
44 | static inline void IWL_DEBUG(int level, const char *fmt, ...) | 53 | static inline void IWL_DEBUG(int level, const char *fmt, ...) |
45 | { | 54 | { |
@@ -47,7 +56,12 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...) | |||
47 | static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) | 56 | static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) |
48 | { | 57 | { |
49 | } | 58 | } |
50 | #endif /* CONFIG_IWL3945_DEBUG */ | 59 | static inline void iwl3945_print_hex_dump(int level, void *p, u32 len) |
60 | { | ||
61 | } | ||
62 | #endif /* CONFIG_IWL3945_DEBUG */ | ||
63 | |||
64 | |||
51 | 65 | ||
52 | /* | 66 | /* |
53 | * To use the debug system; | 67 | * To use the debug system; |
@@ -143,6 +157,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) | |||
143 | IWL_DEBUG_LIMIT(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a) | 157 | IWL_DEBUG_LIMIT(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a) |
144 | #define IWL_DEBUG_HT(f, a...) IWL_DEBUG(IWL_DL_HT, f, ## a) | 158 | #define IWL_DEBUG_HT(f, a...) IWL_DEBUG(IWL_DL_HT, f, ## a) |
145 | #define IWL_DEBUG_STATS(f, a...) IWL_DEBUG(IWL_DL_STATS, f, ## a) | 159 | #define IWL_DEBUG_STATS(f, a...) IWL_DEBUG(IWL_DL_STATS, f, ## a) |
160 | #define IWL_DEBUG_STATS_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_STATS, f, ## a) | ||
146 | #define IWL_DEBUG_TX_REPLY(f, a...) IWL_DEBUG(IWL_DL_TX_REPLY, f, ## a) | 161 | #define IWL_DEBUG_TX_REPLY(f, a...) IWL_DEBUG(IWL_DL_TX_REPLY, f, ## a) |
147 | #define IWL_DEBUG_QOS(f, a...) IWL_DEBUG(IWL_DL_QOS, f, ## a) | 162 | #define IWL_DEBUG_QOS(f, a...) IWL_DEBUG(IWL_DL_QOS, f, ## a) |
148 | #define IWL_DEBUG_RADIO(f, a...) IWL_DEBUG(IWL_DL_RADIO, f, ## a) | 163 | #define IWL_DEBUG_RADIO(f, a...) IWL_DEBUG(IWL_DL_RADIO, f, ## a) |