aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-12 19:58:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:47 -0400
commit712b6cf57a53da608a682b5f782c5785bda76001 (patch)
tree895f6b079b1fca450a644b58b04cb728e656f557 /drivers/net/wireless/iwlwifi/iwl-debug.h
parent19758bef09abe9d2a14575ffb6f686947e97fcb1 (diff)
iwlwifi: Add debugfs to iwl core
This patch adds debugfs support to iwl core currently only iwl4965 is supported 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 067700620e21..c60724c21db8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -49,8 +49,27 @@ static inline void iwl_print_hex_dump(int level, void *p, u32 len)
49 print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1, 49 print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
50 p, len, 1); 50 p, len, 1);
51} 51}
52#else
53 52
53#ifdef CONFIG_IWLWIFI_DEBUGFS
54struct iwl_debugfs {
55 const char *name;
56 struct dentry *dir_drv;
57 struct dentry *dir_data;
58 struct dir_data_files{
59 struct dentry *file_sram;
60 struct dentry *file_stations;
61 struct dentry *file_rx_statistics;
62 struct dentry *file_tx_statistics;
63 } dbgfs_data_files;
64 u32 sram_offset;
65 u32 sram_len;
66};
67
68int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
69void iwl_dbgfs_unregister(struct iwl_priv *priv);
70#endif
71
72#else
54static inline void IWL_DEBUG(int level, const char *fmt, ...) 73static inline void IWL_DEBUG(int level, const char *fmt, ...)
55{ 74{
56} 75}
@@ -64,6 +83,16 @@ static inline void iwl_print_hex_dump(int level, void *p, u32 len)
64 83
65 84
66 85
86#ifndef CONFIG_IWLWIFI_DEBUGFS
87static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
88{
89 return 0;
90}
91static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
92{
93}
94#endif /* CONFIG_IWLWIFI_DEBUGFS */
95
67/* 96/*
68 * To use the debug system; 97 * To use the debug system;
69 * 98 *