aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorEster Kummer <ester.kummer@intel.com>2008-05-04 22:22:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:45 -0400
commitbf403db8a2f5580a5eb355a109d29b9287ca51e1 (patch)
tree90a462e9256170ebbf2025ffc9c01e48bb1c08d8 /drivers/net/wireless/iwlwifi/iwl-dev.h
parent2469bf2e9938eef3c6ab0951985b050ff1f8c94f (diff)
iwlwifi: move per driverdebug_level to per device
This patch ports the debug_level to iwl_priv and changes the format of the debug prints. Signed-off-by: Ester Kummer <ester.kummer@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 4786194c0454..0a37ff4d98b6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1194,6 +1194,7 @@ struct iwl_priv {
1194 1194
1195#ifdef CONFIG_IWLWIFI_DEBUG 1195#ifdef CONFIG_IWLWIFI_DEBUG
1196 /* debugging info */ 1196 /* debugging info */
1197 u32 debug_level;
1197 u32 framecnt_to_us; 1198 u32 framecnt_to_us;
1198 atomic_t restrict_refcnt; 1199 atomic_t restrict_refcnt;
1199#ifdef CONFIG_IWLWIFI_DEBUGFS 1200#ifdef CONFIG_IWLWIFI_DEBUGFS
@@ -1246,6 +1247,23 @@ static inline int is_channel_ibss(const struct iwl_channel_info *ch)
1246 return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; 1247 return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0;
1247} 1248}
1248 1249
1250#ifdef CONFIG_IWLWIFI_DEBUG
1251static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
1252 void *p, u32 len)
1253{
1254 if (!(priv->debug_level & level))
1255 return;
1256
1257 print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
1258 p, len, 1);
1259}
1260#else
1261static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
1262 void *p, u32 len)
1263{
1264}
1265#endif
1266
1249extern const struct iwl_channel_info *iwl_get_channel_info( 1267extern const struct iwl_channel_info *iwl_get_channel_info(
1250 const struct iwl_priv *priv, enum ieee80211_band band, u16 channel); 1268 const struct iwl_priv *priv, enum ieee80211_band band, u16 channel);
1251 1269