]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: move iwl_print_hex_dump to iwl-debug.h
authorWinkler, Tomas <tomas.winkler@intel.com>
Fri, 7 Nov 2008 17:58:43 +0000 (09:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 21 Nov 2008 16:07:23 +0000 (11:07 -0500)
This patch moves iwl_print_hex_dump to iwl-debug.h
where it belongs

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-debug.h
drivers/net/wireless/iwlwifi/iwl-dev.h

index 84b7772809e3dae0966a2f8de4447afec63b10b9..0e79a6ab4c81d637eb990a209424b1fd37482b5d 100644 (file)
@@ -40,6 +40,13 @@ do { if ((priv->debug_level & (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(priv, level, p, len)                        \
+do {                                                                   \
+       if (priv->debug_level & level)                                  \
+               print_hex_dump(KERN_DEBUG, "iwl data: ",                \
+                              DUMP_PREFIX_OFFSET, 16, 1, p, len, 1);   \
+} while (0)
+
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 struct iwl_debugfs {
        const char *name;
@@ -70,6 +77,9 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv);
 #else
 #define IWL_DEBUG(level, fmt, args...)
 #define IWL_DEBUG_LIMIT(level, fmt, args...)
+static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
+                                     void *p, u32 len)
+{}
 #endif                         /* CONFIG_IWLWIFI_DEBUG */
 
 
index c36096069bfd881f8a1c9fd6a7cdf7865e0c52ab..bd3df55e4953938559867a07ece7270b984f1596 100644 (file)
@@ -1089,23 +1089,6 @@ static inline int is_channel_ibss(const struct iwl_channel_info *ch)
        return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0;
 }
 
-#ifdef CONFIG_IWLWIFI_DEBUG
-static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
-                                     void *p, u32 len)
-{
-       if (!(priv->debug_level & level))
-               return;
-
-       print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
-                       p, len, 1);
-}
-#else
-static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
-                                     void *p, u32 len)
-{
-}
-#endif
-
 extern const struct iwl_channel_info *iwl_get_channel_info(
        const struct iwl_priv *priv, enum ieee80211_band band, u16 channel);