iwlwifi: re-introduce per device debugging

Commit "iwlwifi: make debug level more user friendly" cleaned up the
debug level handling. In doing so it created a single global debug
level for all devices. Some setups do consits of more that one iwlwifi
device and in these setups there is a requirement that debug levels
should be unique per device.

We now re-introduce the per device debugging while maintaining the
cleanup effort of the previous patch.

The maintain the global debug level and now introduce a per-device debug
level that will be used if it (the per-device debug level) is set. The
per-device debug level can be controlled via the debug_level sysfs file
while the global debug level is controlled by the debug module parameter.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Esse commit está contido em:
Reinette Chatre
2009-08-07 15:41:37 -07:00
commit de John W. Linville
commit 3d816c77ec
10 arquivos alterados com 63 adições e 40 exclusões

Ver arquivo

@@ -645,7 +645,7 @@ static void iwl_dbg_report_frame(struct iwl_priv *priv,
u32 tsf_low;
int rssi;
if (likely(!(iwl_debug_level & IWL_DL_RX)))
if (likely(!(iwl_get_debug_level(priv) & IWL_DL_RX)))
return;
/* MAC header */
@@ -741,7 +741,7 @@ static void iwl_dbg_report_frame(struct iwl_priv *priv,
}
}
if (print_dump)
iwl_print_hex_dump(IWL_DL_RX, header, length);
iwl_print_hex_dump(priv, IWL_DL_RX, header, length);
}
#endif
@@ -1060,7 +1060,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
/* Set "1" to report good data frames in groups of 100 */
#ifdef CONFIG_IWLWIFI_DEBUG
if (unlikely(iwl_debug_level & IWL_DL_RX))
if (unlikely(iwl_get_debug_level(priv) & IWL_DL_RX))
iwl_dbg_report_frame(priv, rx_start, len, header, 1);
#endif
IWL_DEBUG_STATS_LIMIT(priv, "Rssi %d, noise %d, qual %d, TSF %llu\n",