Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
[deliverable/linux.git] / drivers / net / wireless / b43 / debugfs.h
CommitLineData
e4d6b795
MB
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,
f5eda47f 13 B43_DBG_LO,
923fd703 14 B43_DBG_FIRMWARE,
9cf7f247 15 B43_DBG_KEYS,
e4d6b795
MB
16 __B43_NR_DYNDBG,
17};
18
19#ifdef CONFIG_B43_DEBUG
20
21struct dentry;
22
23#define B43_NR_LOGGED_TXSTATUS 100
24
25struct b43_txstatus_log {
26 struct b43_txstatus *log;
27 int end;
28 spinlock_t lock;
29};
30
31struct b43_dfs_file {
32 struct dentry *dentry;
33 char *buffer;
34 size_t data_len;
35};
36
37struct b43_dfsentry {
38 struct b43_wldev *dev;
39 struct dentry *subdir;
40
6bbc321a
MB
41 struct b43_dfs_file file_shm16read;
42 struct b43_dfs_file file_shm16write;
43 struct b43_dfs_file file_shm32read;
44 struct b43_dfs_file file_shm32write;
8bd463f4
MB
45 struct b43_dfs_file file_mmio16read;
46 struct b43_dfs_file file_mmio16write;
47 struct b43_dfs_file file_mmio32read;
48 struct b43_dfs_file file_mmio32write;
e4d6b795
MB
49 struct b43_dfs_file file_txstat;
50 struct b43_dfs_file file_txpower_g;
51 struct b43_dfs_file file_restart;
52 struct b43_dfs_file file_loctls;
53
54 struct b43_txstatus_log txstatlog;
55
8bd463f4
MB
56 /* The cached address for the next mmio16read file read */
57 u16 mmio16read_next;
58 /* The cached address for the next mmio32read file read */
59 u16 mmio32read_next;
60
6bbc321a
MB
61 /* The cached address for the next shm16read file read */
62 u32 shm16read_routing_next;
63 u32 shm16read_addr_next;
64 /* The cached address for the next shm32read file read */
65 u32 shm32read_routing_next;
66 u32 shm32read_addr_next;
67
e4d6b795
MB
68 /* Enabled/Disabled list for the dynamic debugging features. */
69 u32 dyn_debug[__B43_NR_DYNDBG];
70 /* Dentries for the dynamic debugging entries. */
71 struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG];
72};
73
060210f9 74bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
e4d6b795
MB
75
76void b43_debugfs_init(void);
77void b43_debugfs_exit(void);
78void b43_debugfs_add_device(struct b43_wldev *dev);
79void b43_debugfs_remove_device(struct b43_wldev *dev);
80void b43_debugfs_log_txstat(struct b43_wldev *dev,
81 const struct b43_txstatus *status);
82
83#else /* CONFIG_B43_DEBUG */
84
060210f9 85static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
e4d6b795
MB
86{
87 return 0;
88}
89
90static inline void b43_debugfs_init(void)
91{
92}
93static inline void b43_debugfs_exit(void)
94{
95}
96static inline void b43_debugfs_add_device(struct b43_wldev *dev)
97{
98}
99static inline void b43_debugfs_remove_device(struct b43_wldev *dev)
100{
101}
102static inline void b43_debugfs_log_txstat(struct b43_wldev *dev,
103 const struct b43_txstatus *status)
104{
105}
106
107#endif /* CONFIG_B43_DEBUG */
108
109#endif /* B43_DEBUGFS_H_ */
This page took 0.28796 seconds and 5 git commands to generate.