aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index c60724c21db8..58384805a494 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -30,37 +30,35 @@
30#define __iwl_debug_h__ 30#define __iwl_debug_h__
31 31
32#ifdef CONFIG_IWLWIFI_DEBUG 32#ifdef CONFIG_IWLWIFI_DEBUG
33extern u32 iwl_debug_level;
34#define IWL_DEBUG(level, fmt, args...) \ 33#define IWL_DEBUG(level, fmt, args...) \
35do { if (iwl_debug_level & (level)) \ 34do { if (priv->debug_level & (level)) \
36 printk(KERN_ERR DRV_NAME": %c %s " fmt, \ 35 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
37 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 36 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
38 37
39#define IWL_DEBUG_LIMIT(level, fmt, args...) \ 38#define IWL_DEBUG_LIMIT(level, fmt, args...) \
40do { if ((iwl_debug_level & (level)) && net_ratelimit()) \ 39do { if ((priv->debug_level & (level)) && net_ratelimit()) \
41 printk(KERN_ERR DRV_NAME": %c %s " fmt, \ 40 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
42 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 41 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
43 42
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 43#ifdef CONFIG_IWLWIFI_DEBUGFS
54struct iwl_debugfs { 44struct iwl_debugfs {
55 const char *name; 45 const char *name;
56 struct dentry *dir_drv; 46 struct dentry *dir_drv;
57 struct dentry *dir_data; 47 struct dentry *dir_data;
58 struct dir_data_files{ 48 struct dentry *dir_rf;
49 struct dir_data_files {
59 struct dentry *file_sram; 50 struct dentry *file_sram;
51 struct dentry *file_eeprom;
60 struct dentry *file_stations; 52 struct dentry *file_stations;
61 struct dentry *file_rx_statistics; 53 struct dentry *file_rx_statistics;
62 struct dentry *file_tx_statistics; 54 struct dentry *file_tx_statistics;
55 struct dentry *file_log_event;
63 } dbgfs_data_files; 56 } dbgfs_data_files;
57 struct dir_rf_files {
58 struct dentry *file_disable_sensitivity;
59 struct dentry *file_disable_chain_noise;
60 struct dentry *file_disable_tx_power;
61 } dbgfs_rf_files;
64 u32 sram_offset; 62 u32 sram_offset;
65 u32 sram_len; 63 u32 sram_len;
66}; 64};
@@ -76,9 +74,6 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)
76static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) 74static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
77{ 75{
78} 76}
79static inline void iwl_print_hex_dump(int level, void *p, u32 len)
80{
81}
82#endif /* CONFIG_IWLWIFI_DEBUG */ 77#endif /* CONFIG_IWLWIFI_DEBUG */
83 78
84 79