b43: Rewrite LO calibration algorithm
[linux-2.6/mini2440.git] / drivers / net / wireless / b43 / debugfs.h
blobc75cff4151d9a7609b05ffcbcf42262eaa3b654b
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_DBG_LO,
14 __B43_NR_DYNDBG,
17 #ifdef CONFIG_B43_DEBUG
19 struct dentry;
21 #define B43_NR_LOGGED_TXSTATUS 100
23 struct b43_txstatus_log {
24 struct b43_txstatus *log;
25 int end;
26 spinlock_t lock;
29 struct b43_dfs_file {
30 struct dentry *dentry;
31 char *buffer;
32 size_t data_len;
35 struct b43_dfsentry {
36 struct b43_wldev *dev;
37 struct dentry *subdir;
39 struct b43_dfs_file file_tsf;
40 struct b43_dfs_file file_ucode_regs;
41 struct b43_dfs_file file_shm;
42 struct b43_dfs_file file_txstat;
43 struct b43_dfs_file file_txpower_g;
44 struct b43_dfs_file file_restart;
45 struct b43_dfs_file file_loctls;
47 struct b43_txstatus_log txstatlog;
49 /* Enabled/Disabled list for the dynamic debugging features. */
50 u32 dyn_debug[__B43_NR_DYNDBG];
51 /* Dentries for the dynamic debugging entries. */
52 struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG];
55 int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
57 void b43_debugfs_init(void);
58 void b43_debugfs_exit(void);
59 void b43_debugfs_add_device(struct b43_wldev *dev);
60 void b43_debugfs_remove_device(struct b43_wldev *dev);
61 void b43_debugfs_log_txstat(struct b43_wldev *dev,
62 const struct b43_txstatus *status);
64 #else /* CONFIG_B43_DEBUG */
66 static inline int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
68 return 0;
71 static inline void b43_debugfs_init(void)
74 static inline void b43_debugfs_exit(void)
77 static inline void b43_debugfs_add_device(struct b43_wldev *dev)
80 static inline void b43_debugfs_remove_device(struct b43_wldev *dev)
83 static inline void b43_debugfs_log_txstat(struct b43_wldev *dev,
84 const struct b43_txstatus *status)
88 #endif /* CONFIG_B43_DEBUG */
90 #endif /* B43_DEBUGFS_H_ */