diff options
author | Ester Kummer <ester.kummer@intel.com> | 2008-05-04 22:22:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-14 16:29:45 -0400 |
commit | bf403db8a2f5580a5eb355a109d29b9287ca51e1 (patch) | |
tree | 90a462e9256170ebbf2025ffc9c01e48bb1c08d8 /drivers/net/wireless/iwlwifi/iwl-debug.h | |
parent | 2469bf2e9938eef3c6ab0951985b050ff1f8c94f (diff) |
iwlwifi: move per driverdebug_level to per device
This patch ports the debug_level to iwl_priv and changes
the format of the debug prints.
Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 7e68d24114f8..14d95dd0e14d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -32,24 +32,15 @@ | |||
32 | #ifdef CONFIG_IWLWIFI_DEBUG | 32 | #ifdef CONFIG_IWLWIFI_DEBUG |
33 | extern u32 iwl_debug_level; | 33 | extern u32 iwl_debug_level; |
34 | #define IWL_DEBUG(level, fmt, args...) \ | 34 | #define IWL_DEBUG(level, fmt, args...) \ |
35 | do { if (iwl_debug_level & (level)) \ | 35 | do { if (priv->debug_level & (level)) \ |
36 | printk(KERN_ERR DRV_NAME": %c %s " fmt, \ | 36 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ |
37 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 37 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) |
38 | 38 | ||
39 | #define IWL_DEBUG_LIMIT(level, fmt, args...) \ | 39 | #define IWL_DEBUG_LIMIT(level, fmt, args...) \ |
40 | do { if ((iwl_debug_level & (level)) && net_ratelimit()) \ | 40 | do { if ((priv->debug_level & (level)) && net_ratelimit()) \ |
41 | printk(KERN_ERR DRV_NAME": %c %s " fmt, \ | 41 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ |
42 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 42 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) |
43 | 43 | ||
44 | static inline void iwl_print_hex_dump(int level, void *p, u32 len) | ||
45 | { | ||
46 | if (!(iwl_debug_level & level)) | ||
47 | return; | ||
48 | |||
49 | print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1, | ||
50 | p, len, 1); | ||
51 | } | ||
52 | |||
53 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 44 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
54 | struct iwl_debugfs { | 45 | struct iwl_debugfs { |
55 | const char *name; | 46 | const char *name; |
@@ -77,9 +68,6 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...) | |||
77 | static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) | 68 | static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) |
78 | { | 69 | { |
79 | } | 70 | } |
80 | static inline void iwl_print_hex_dump(int level, void *p, u32 len) | ||
81 | { | ||
82 | } | ||
83 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 71 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
84 | 72 | ||
85 | 73 | ||