]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/wireless/iwlwifi/iwl-debug.h
iwlwifi: re-introduce per device debugging
[mirror_ubuntu-artful-kernel.git] / drivers / net / wireless / iwlwifi / iwl-debug.h
index fbe177608bc7adee4e07f08e738a4c63d8b9fc85..09af046927abf9b3cc524f80cb75b2568f000086 100644 (file)
@@ -46,7 +46,7 @@ do {                                                                  \
 #ifdef CONFIG_IWLWIFI_DEBUG
 #define IWL_DEBUG(__priv, level, fmt, args...)                         \
 do {                                                                   \
-       if (iwl_debug_level & (level))                                  \
+       if (iwl_get_debug_level(__priv) & (level))                                      \
                dev_printk(KERN_ERR, &(__priv->hw->wiphy->dev),         \
                         "%c %s " fmt, in_interrupt() ? 'I' : 'U',      \
                        __func__ , ## args);                            \
@@ -54,15 +54,15 @@ do {                                                                        \
 
 #define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)                   \
 do {                                                                   \
-       if ((iwl_debug_level & (level)) && net_ratelimit())             \
+       if ((iwl_get_debug_level(__priv) & (level)) && net_ratelimit())         \
                dev_printk(KERN_ERR, &(__priv->hw->wiphy->dev),         \
                        "%c %s " fmt, in_interrupt() ? 'I' : 'U',       \
                         __func__ , ## args);                           \
 } while (0)
 
-#define iwl_print_hex_dump(level, p, len)                              \
+#define iwl_print_hex_dump(priv, level, p, len)                        \
 do {                                                                   \
-       if (iwl_debug_level & level)                                    \
+       if (iwl_get_debug_level(priv) & level)                          \
                print_hex_dump(KERN_DEBUG, "iwl data: ",                \
                               DUMP_PREFIX_OFFSET, 16, 1, p, len, 1);   \
 } while (0)
@@ -106,7 +106,8 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv);
 #else
 #define IWL_DEBUG(__priv, level, fmt, args...)
 #define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
-static inline void iwl_print_hex_dump(int level, void *p, u32 len)
+static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
+                                     void *p, u32 len)
 {}
 #endif                         /* CONFIG_IWLWIFI_DEBUG */