Chinese: add translation of oops-tracing.txt
[pv_ops_mirror.git] / drivers / net / wireless / b43legacy / debugfs.h
blobae3b0d0fa84904b146f9c9129fd70dd1eedc5168
1 #ifndef B43legacy_DEBUGFS_H_
2 #define B43legacy_DEBUGFS_H_
4 struct b43legacy_wldev;
5 struct b43legacy_txstatus;
7 enum b43legacy_dyndbg { /* Dynamic debugging features */
8 B43legacy_DBG_XMITPOWER,
9 B43legacy_DBG_DMAOVERFLOW,
10 B43legacy_DBG_DMAVERBOSE,
11 B43legacy_DBG_PWORK_FAST,
12 B43legacy_DBG_PWORK_STOP,
13 __B43legacy_NR_DYNDBG,
17 #ifdef CONFIG_B43LEGACY_DEBUG
19 struct dentry;
21 #define B43legacy_NR_LOGGED_TXSTATUS 100
23 struct b43legacy_txstatus_log {
24 struct b43legacy_txstatus *log;
25 int end;
26 spinlock_t lock; /* lock for debugging */
29 struct b43legacy_dfs_file {
30 struct dentry *dentry;
31 char *buffer;
32 size_t data_len;
35 struct b43legacy_dfsentry {
36 struct b43legacy_wldev *dev;
37 struct dentry *subdir;
39 struct b43legacy_dfs_file file_tsf;
40 struct b43legacy_dfs_file file_ucode_regs;
41 struct b43legacy_dfs_file file_shm;
42 struct b43legacy_dfs_file file_txstat;
43 struct b43legacy_dfs_file file_txpower_g;
44 struct b43legacy_dfs_file file_restart;
45 struct b43legacy_dfs_file file_loctls;
47 struct b43legacy_txstatus_log txstatlog;
49 /* Enabled/Disabled list for the dynamic debugging features. */
50 u32 dyn_debug[__B43legacy_NR_DYNDBG];
51 /* Dentries for the dynamic debugging entries. */
52 struct dentry *dyn_debug_dentries[__B43legacy_NR_DYNDBG];
55 int b43legacy_debug(struct b43legacy_wldev *dev,
56 enum b43legacy_dyndbg feature);
58 void b43legacy_debugfs_init(void);
59 void b43legacy_debugfs_exit(void);
60 void b43legacy_debugfs_add_device(struct b43legacy_wldev *dev);
61 void b43legacy_debugfs_remove_device(struct b43legacy_wldev *dev);
62 void b43legacy_debugfs_log_txstat(struct b43legacy_wldev *dev,
63 const struct b43legacy_txstatus *status);
65 #else /* CONFIG_B43LEGACY_DEBUG*/
67 static inline
68 int b43legacy_debug(struct b43legacy_wldev *dev,
69 enum b43legacy_dyndbg feature)
71 return 0;
74 static inline
75 void b43legacy_debugfs_init(void) { }
76 static inline
77 void b43legacy_debugfs_exit(void) { }
78 static inline
79 void b43legacy_debugfs_add_device(struct b43legacy_wldev *dev) { }
80 static inline
81 void b43legacy_debugfs_remove_device(struct b43legacy_wldev *dev) { }
82 static inline
83 void b43legacy_debugfs_log_txstat(struct b43legacy_wldev *dev,
84 const struct b43legacy_txstatus *status)
85 { }
87 #endif /* CONFIG_B43LEGACY_DEBUG*/
89 #endif /* B43legacy_DEBUGFS_H_ */