aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
authorEster Kummer <ester.kummer@intel.com>2008-05-04 22:22:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:45 -0400
commitbf403db8a2f5580a5eb355a109d29b9287ca51e1 (patch)
tree90a462e9256170ebbf2025ffc9c01e48bb1c08d8 /drivers/net/wireless/iwlwifi/iwl-debug.h
parent2469bf2e9938eef3c6ab0951985b050ff1f8c94f (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.h20
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
33extern u32 iwl_debug_level; 33extern u32 iwl_debug_level;
34#define IWL_DEBUG(level, fmt, args...) \ 34#define IWL_DEBUG(level, fmt, args...) \
35do { if (iwl_debug_level & (level)) \ 35do { 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...) \
40do { if ((iwl_debug_level & (level)) && net_ratelimit()) \ 40do { 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
44static 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
54struct iwl_debugfs { 45struct iwl_debugfs {
55 const char *name; 46 const char *name;
@@ -77,9 +68,6 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)
77static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) 68static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
78{ 69{
79} 70}
80static 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