diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 17 |
2 files changed, 10 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 84b7772809e3..0e79a6ab4c81 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -40,6 +40,13 @@ do { if ((priv->debug_level & (level)) && net_ratelimit()) \ | |||
40 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ | 40 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ |
41 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) | 41 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
42 | 42 | ||
43 | #define iwl_print_hex_dump(priv, level, p, len) \ | ||
44 | do { \ | ||
45 | if (priv->debug_level & level) \ | ||
46 | print_hex_dump(KERN_DEBUG, "iwl data: ", \ | ||
47 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ | ||
48 | } while (0) | ||
49 | |||
43 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 50 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
44 | struct iwl_debugfs { | 51 | struct iwl_debugfs { |
45 | const char *name; | 52 | const char *name; |
@@ -70,6 +77,9 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv); | |||
70 | #else | 77 | #else |
71 | #define IWL_DEBUG(level, fmt, args...) | 78 | #define IWL_DEBUG(level, fmt, args...) |
72 | #define IWL_DEBUG_LIMIT(level, fmt, args...) | 79 | #define IWL_DEBUG_LIMIT(level, fmt, args...) |
80 | static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, | ||
81 | void *p, u32 len) | ||
82 | {} | ||
73 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 83 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
74 | 84 | ||
75 | 85 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c36096069bfd..bd3df55e4953 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1089,23 +1089,6 @@ static inline int is_channel_ibss(const struct iwl_channel_info *ch) | |||
1089 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; | 1089 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; |
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1093 | static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, | ||
1094 | void *p, u32 len) | ||
1095 | { | ||
1096 | if (!(priv->debug_level & level)) | ||
1097 | return; | ||
1098 | |||
1099 | print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1, | ||
1100 | p, len, 1); | ||
1101 | } | ||
1102 | #else | ||
1103 | static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, | ||
1104 | void *p, u32 len) | ||
1105 | { | ||
1106 | } | ||
1107 | #endif | ||
1108 | |||
1109 | extern const struct iwl_channel_info *iwl_get_channel_info( | 1092 | extern const struct iwl_channel_info *iwl_get_channel_info( |
1110 | const struct iwl_priv *priv, enum ieee80211_band band, u16 channel); | 1093 | const struct iwl_priv *priv, enum ieee80211_band band, u16 channel); |
1111 | 1094 | ||