Committer: Michael Beasley <mike@snafu.setup>
[mikesnafu-overlay.git] / drivers / net / wireless / b43 / debugfs.h
blob6eebe858db5af265d51dbfb884ab0cf2e7110b57
1 #ifndef B43_DEBUGFS_H_
2 #define B43_DEBUGFS_H_
4 struct b43_wldev;
5 struct b43_txstatus;
7 enum b43_dyndbg { /* Dynamic debugging features */
8 B43_DBG_XMITPOWER,
9 B43_DBG_DMAOVERFLOW,
10 B43_DBG_DMAVERBOSE,
11 B43_DBG_PWORK_FAST,
12 B43_DBG_PWORK_STOP,
13 __B43_NR_DYNDBG,
16 #ifdef CONFIG_B43_DEBUG
18 struct dentry;
20 #define B43_NR_LOGGED_TXSTATUS 100
22 struct b43_txstatus_log {
23 struct b43_txstatus *log;
24 int end;
25 spinlock_t lock;
28 struct b43_dfs_file {
29 struct dentry *dentry;
30 char *buffer;
31 size_t data_len;
34 struct b43_dfsentry {
35 struct b43_wldev *dev;
36 struct dentry *subdir;
38 struct b43_dfs_file file_tsf;
39 struct b43_dfs_file file_ucode_regs;
40 struct b43_dfs_file file_shm;
41 struct b43_dfs_file file_txstat;
42 struct b43_dfs_file file_txpower_g;
43 struct b43_dfs_file file_restart;
44 struct b43_dfs_file file_loctls;
46 struct b43_txstatus_log txstatlog;
48 /* Enabled/Disabled list for the dynamic debugging features. */
49 u32 dyn_debug[__B43_NR_DYNDBG];
50 /* Dentries for the dynamic debugging entries. */
51 struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG];
54 int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
56 void b43_debugfs_init(void);
57 void b43_debugfs_exit(void);
58 void b43_debugfs_add_device(struct b43_wldev *dev);
59 void b43_debugfs_remove_device(struct b43_wldev *dev);
60 void b43_debugfs_log_txstat(struct b43_wldev *dev,
61 const struct b43_txstatus *status);
63 #else /* CONFIG_B43_DEBUG */
65 static inline int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
67 return 0;
70 static inline void b43_debugfs_init(void)
73 static inline void b43_debugfs_exit(void)
76 static inline void b43_debugfs_add_device(struct b43_wldev *dev)
79 static inline void b43_debugfs_remove_device(struct b43_wldev *dev)
82 static inline void b43_debugfs_log_txstat(struct b43_wldev *dev,
83 const struct b43_txstatus *status)
87 #endif /* CONFIG_B43_DEBUG */
89 #endif /* B43_DEBUGFS_H_ */