aboutsummaryrefslogtreecommitdiffstats
path: root/package/b43/src/debugfs.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-13 22:41:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-13 22:41:37 +0000
commitc512b90fd4a2ad52ae326c3d14acde457e9831c3 (patch)
treedb35bfa142a4e8a06e5ec0e1bec025917b37fb70 /package/b43/src/debugfs.h
parent479bafd63370af4ac157d74a8666867e8b41caf2 (diff)
downloadupstream-c512b90fd4a2ad52ae326c3d14acde457e9831c3.tar.gz
upstream-c512b90fd4a2ad52ae326c3d14acde457e9831c3.tar.bz2
upstream-c512b90fd4a2ad52ae326c3d14acde457e9831c3.zip
add b43
SVN-Revision: 9293
Diffstat (limited to 'package/b43/src/debugfs.h')
-rw-r--r--package/b43/src/debugfs.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/package/b43/src/debugfs.h b/package/b43/src/debugfs.h
new file mode 100644
index 0000000000..6eebe858db
--- /dev/null
+++ b/package/b43/src/debugfs.h
@@ -0,0 +1,89 @@
+#ifndef B43_DEBUGFS_H_
+#define B43_DEBUGFS_H_
+
+struct b43_wldev;
+struct b43_txstatus;
+
+enum b43_dyndbg { /* Dynamic debugging features */
+ B43_DBG_XMITPOWER,
+ B43_DBG_DMAOVERFLOW,
+ B43_DBG_DMAVERBOSE,
+ B43_DBG_PWORK_FAST,
+ B43_DBG_PWORK_STOP,
+ __B43_NR_DYNDBG,
+};
+
+#ifdef CONFIG_B43_DEBUG
+
+struct dentry;
+
+#define B43_NR_LOGGED_TXSTATUS 100
+
+struct b43_txstatus_log {
+ struct b43_txstatus *log;
+ int end;
+ spinlock_t lock;
+};
+
+struct b43_dfs_file {
+ struct dentry *dentry;
+ char *buffer;
+ size_t data_len;
+};
+
+struct b43_dfsentry {
+ struct b43_wldev *dev;
+ struct dentry *subdir;
+
+ struct b43_dfs_file file_tsf;
+ struct b43_dfs_file file_ucode_regs;
+ struct b43_dfs_file file_shm;
+ struct b43_dfs_file file_txstat;
+ struct b43_dfs_file file_txpower_g;
+ struct b43_dfs_file file_restart;
+ struct b43_dfs_file file_loctls;
+
+ struct b43_txstatus_log txstatlog;
+
+ /* Enabled/Disabled list for the dynamic debugging features. */
+ u32 dyn_debug[__B43_NR_DYNDBG];
+ /* Dentries for the dynamic debugging entries. */
+ struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG];
+};
+
+int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
+
+void b43_debugfs_init(void);
+void b43_debugfs_exit(void);
+void b43_debugfs_add_device(struct b43_wldev *dev);
+void b43_debugfs_remove_device(struct b43_wldev *dev);
+void b43_debugfs_log_txstat(struct b43_wldev *dev,
+ const struct b43_txstatus *status);
+
+#else /* CONFIG_B43_DEBUG */
+
+static inline int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
+{
+ return 0;
+}
+
+static inline void b43_debugfs_init(void)
+{
+}
+static inline void b43_debugfs_exit(void)
+{
+}
+static inline void b43_debugfs_add_device(struct b43_wldev *dev)
+{
+}
+static inline void b43_debugfs_remove_device(struct b43_wldev *dev)
+{
+}
+static inline void b43_debugfs_log_txstat(struct b43_wldev *dev,
+ const struct b43_txstatus *status)
+{
+}
+
+#endif /* CONFIG_B43_DEBUG */
+
+#endif /* B43_DEBUGFS_H_ */