diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 01b23303d736..a6b32a11e103 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -47,12 +47,12 @@ void __iwl_crit(struct device *dev, const char *fmt, ...); | |||
47 | #define IWL_CRIT(m, f, a...) __iwl_crit(trans(m)->dev, f, ## a) | 47 | #define IWL_CRIT(m, f, a...) __iwl_crit(trans(m)->dev, f, ## a) |
48 | 48 | ||
49 | #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING) | 49 | #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING) |
50 | void __iwl_dbg(struct iwl_shared *shared, struct device *dev, | 50 | void __iwl_dbg(struct device *dev, |
51 | u32 level, bool limit, const char *function, | 51 | u32 level, bool limit, const char *function, |
52 | const char *fmt, ...); | 52 | const char *fmt, ...); |
53 | #else | 53 | #else |
54 | static inline void | 54 | static inline void |
55 | __iwl_dbg(struct iwl_shared *shared, struct device *dev, | 55 | __iwl_dbg(struct device *dev, |
56 | u32 level, bool limit, const char *function, | 56 | u32 level, bool limit, const char *function, |
57 | const char *fmt, ...) | 57 | const char *fmt, ...) |
58 | {} | 58 | {} |
@@ -65,35 +65,19 @@ do { \ | |||
65 | } while (0) | 65 | } while (0) |
66 | 66 | ||
67 | #define IWL_DEBUG(m, level, fmt, args...) \ | 67 | #define IWL_DEBUG(m, level, fmt, args...) \ |
68 | __iwl_dbg((m)->shrd, trans(m)->dev, level, false, __func__, fmt, ##args) | 68 | __iwl_dbg(trans(m)->dev, level, false, __func__, fmt, ##args) |
69 | #define IWL_DEBUG_LIMIT(m, level, fmt, args...) \ | 69 | #define IWL_DEBUG_LIMIT(m, level, fmt, args...) \ |
70 | __iwl_dbg((m)->shrd, trans(m)->dev, level, true, __func__, fmt, ##args) | 70 | __iwl_dbg(trans(m)->dev, level, true, __func__, fmt, ##args) |
71 | 71 | ||
72 | #ifdef CONFIG_IWLWIFI_DEBUG | 72 | #ifdef CONFIG_IWLWIFI_DEBUG |
73 | #define iwl_print_hex_dump(m, level, p, len) \ | 73 | #define iwl_print_hex_dump(m, level, p, len) \ |
74 | do { \ | 74 | do { \ |
75 | if (iwl_get_debug_level((m)->shrd) & level) \ | 75 | if (iwl_have_debug_level(level)) \ |
76 | print_hex_dump(KERN_DEBUG, "iwl data: ", \ | 76 | print_hex_dump(KERN_DEBUG, "iwl data: ", \ |
77 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ | 77 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ |
78 | } while (0) | 78 | } while (0) |
79 | #define IWL_DEBUG_QUIET_RFKILL(m, fmt, args...) \ | ||
80 | do { \ | ||
81 | if (!iwl_is_rfkill((m)->shrd)) \ | ||
82 | IWL_ERR(m, fmt, ##args); \ | ||
83 | else \ | ||
84 | __iwl_err(trans(m)->dev, true, \ | ||
85 | !(iwl_get_debug_level((m)->shrd) & IWL_DL_RADIO),\ | ||
86 | fmt, ##args); \ | ||
87 | } while (0) | ||
88 | #else | 79 | #else |
89 | #define iwl_print_hex_dump(m, level, p, len) | 80 | #define iwl_print_hex_dump(m, level, p, len) |
90 | #define IWL_DEBUG_QUIET_RFKILL(m, fmt, args...) \ | ||
91 | do { \ | ||
92 | if (!iwl_is_rfkill((m)->shrd)) \ | ||
93 | IWL_ERR(m, fmt, ##args); \ | ||
94 | else \ | ||
95 | __iwl_err(trans(m)->dev, true, true, fmt, ##args); \ | ||
96 | } while (0) | ||
97 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 81 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
98 | 82 | ||
99 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 83 | #ifdef CONFIG_IWLWIFI_DEBUGFS |