diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 40ef97bac1aa..44a7bdd7ccfd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -47,20 +47,21 @@ do { \ | |||
47 | } while (0) | 47 | } while (0) |
48 | 48 | ||
49 | #ifdef CONFIG_IWLWIFI_DEBUG | 49 | #ifdef CONFIG_IWLWIFI_DEBUG |
50 | #define IWL_DEBUG(m, level, fmt, args...) \ | 50 | #define IWL_DEBUG(m, level, fmt, ...) \ |
51 | do { \ | 51 | do { \ |
52 | if (iwl_get_debug_level((m)->shrd) & (level)) \ | 52 | if (iwl_get_debug_level((m)->shrd) & (level)) \ |
53 | dev_printk(KERN_ERR, bus(m)->dev, \ | 53 | dev_err(bus(m)->dev, "%c %s " fmt, \ |
54 | "%c %s " fmt, in_interrupt() ? 'I' : 'U', \ | 54 | in_interrupt() ? 'I' : 'U', __func__, \ |
55 | __func__ , ## args); \ | 55 | ##__VA_ARGS__); \ |
56 | } while (0) | 56 | } while (0) |
57 | 57 | ||
58 | #define IWL_DEBUG_LIMIT(m, level, fmt, args...) \ | 58 | #define IWL_DEBUG_LIMIT(m, level, fmt, ...) \ |
59 | do { \ | 59 | do { \ |
60 | if (iwl_get_debug_level((m)->shrd) & (level) && net_ratelimit())\ | 60 | if (iwl_get_debug_level((m)->shrd) & (level) && \ |
61 | dev_printk(KERN_ERR, bus(m)->dev, \ | 61 | net_ratelimit()) \ |
62 | "%c %s " fmt, in_interrupt() ? 'I' : 'U', \ | 62 | dev_err(bus(m)->dev, "%c %s " fmt, \ |
63 | __func__ , ## args); \ | 63 | in_interrupt() ? 'I' : 'U', __func__, \ |
64 | ##__VA_ARGS__); \ | ||
64 | } while (0) | 65 | } while (0) |
65 | 66 | ||
66 | #define iwl_print_hex_dump(m, level, p, len) \ | 67 | #define iwl_print_hex_dump(m, level, p, len) \ |
@@ -70,14 +71,18 @@ do { \ | |||
70 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ | 71 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ |
71 | } while (0) | 72 | } while (0) |
72 | 73 | ||
73 | #define IWL_DEBUG_QUIET_RFKILL(p, fmt, args...) \ | 74 | #define IWL_DEBUG_QUIET_RFKILL(p, fmt, ...) \ |
74 | do { \ | 75 | do { \ |
75 | if (!iwl_is_rfkill(p->shrd)) \ | 76 | if (!iwl_is_rfkill(p->shrd)) \ |
76 | dev_printk(KERN_ERR, bus(p)->dev, "%c %s " fmt, \ | 77 | dev_err(bus(p)->dev, "%s%c %s " fmt, \ |
77 | (in_interrupt() ? 'I' : 'U'), __func__ , ##args); \ | 78 | "", \ |
78 | else if (iwl_get_debug_level(p->shrd) & IWL_DL_RADIO) \ | 79 | in_interrupt() ? 'I' : 'U', __func__, \ |
79 | dev_printk(KERN_ERR, bus(p)->dev, "(RFKILL) %c %s " fmt, \ | 80 | ##__VA_ARGS__); \ |
80 | (in_interrupt() ? 'I' : 'U'), __func__ , ##args); \ | 81 | else if (iwl_get_debug_level(p->shrd) & IWL_DL_RADIO) \ |
82 | dev_err(bus(p)->dev, "%s%c %s " fmt, \ | ||
83 | "(RFKILL) ", \ | ||
84 | in_interrupt() ? 'I' : 'U', __func__, \ | ||
85 | ##__VA_ARGS__); \ | ||
81 | } while (0) | 86 | } while (0) |
82 | 87 | ||
83 | #else | 88 | #else |