Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v2.6.24 89 lines 1.9 kB view raw
1#ifndef B43_DEBUGFS_H_ 2#define B43_DEBUGFS_H_ 3 4struct b43_wldev; 5struct b43_txstatus; 6 7enum 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, 14}; 15 16#ifdef CONFIG_B43_DEBUG 17 18struct dentry; 19 20#define B43_NR_LOGGED_TXSTATUS 100 21 22struct b43_txstatus_log { 23 struct b43_txstatus *log; 24 int end; 25 spinlock_t lock; 26}; 27 28struct b43_dfs_file { 29 struct dentry *dentry; 30 char *buffer; 31 size_t data_len; 32}; 33 34struct b43_dfsentry { 35 struct b43_wldev *dev; 36 struct dentry *subdir; 37 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; 45 46 struct b43_txstatus_log txstatlog; 47 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]; 52}; 53 54int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature); 55 56void b43_debugfs_init(void); 57void b43_debugfs_exit(void); 58void b43_debugfs_add_device(struct b43_wldev *dev); 59void b43_debugfs_remove_device(struct b43_wldev *dev); 60void b43_debugfs_log_txstat(struct b43_wldev *dev, 61 const struct b43_txstatus *status); 62 63#else /* CONFIG_B43_DEBUG */ 64 65static inline int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature) 66{ 67 return 0; 68} 69 70static inline void b43_debugfs_init(void) 71{ 72} 73static inline void b43_debugfs_exit(void) 74{ 75} 76static inline void b43_debugfs_add_device(struct b43_wldev *dev) 77{ 78} 79static inline void b43_debugfs_remove_device(struct b43_wldev *dev) 80{ 81} 82static inline void b43_debugfs_log_txstat(struct b43_wldev *dev, 83 const struct b43_txstatus *status) 84{ 85} 86 87#endif /* CONFIG_B43_DEBUG */ 88 89#endif /* B43_DEBUGFS_H_ */