summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-12 16:58:52 -0700
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 067700620e2..c60724c21db 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)
print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
p, len, 1);
}
-#else
+#ifdef CONFIG_IWLWIFI_DEBUGFS
+struct iwl_debugfs {
+ const char *name;
+ struct dentry *dir_drv;
+ struct dentry *dir_data;
+ struct dir_data_files{
+ struct dentry *file_sram;
+ struct dentry *file_stations;
+ struct dentry *file_rx_statistics;
+ struct dentry *file_tx_statistics;
+ } dbgfs_data_files;
+ u32 sram_offset;
+ u32 sram_len;
+};
+
+int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
+void iwl_dbgfs_unregister(struct iwl_priv *priv);
+#endif
+
+#else
static inline void IWL_DEBUG(int level, const char *fmt, ...)
{
}
@@ -64,6 +83,16 @@ static inline void iwl_print_hex_dump(int level, void *p, u32 len)
+#ifndef CONFIG_IWLWIFI_DEBUGFS
+static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
+{
+ return 0;
+}
+static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
+{
+}
+#endif /* CONFIG_IWLWIFI_DEBUGFS */
+
/*
* To use the debug system;
*