1 /* SPDX-License-Identifier: GPL-2.0 */
8 enum b43_dyndbg { /* Dynamic debugging features */
21 #ifdef CONFIG_B43_DEBUG
25 #define B43_NR_LOGGED_TXSTATUS 100
27 struct b43_txstatus_log {
28 /* This structure is protected by wl->mutex */
30 struct b43_txstatus *log;
40 struct b43_wldev *dev;
41 struct dentry *subdir;
43 struct b43_dfs_file file_shm16read;
44 struct b43_dfs_file file_shm16write;
45 struct b43_dfs_file file_shm32read;
46 struct b43_dfs_file file_shm32write;
47 struct b43_dfs_file file_mmio16read;
48 struct b43_dfs_file file_mmio16write;
49 struct b43_dfs_file file_mmio32read;
50 struct b43_dfs_file file_mmio32write;
51 struct b43_dfs_file file_txstat;
52 struct b43_dfs_file file_txpower_g;
53 struct b43_dfs_file file_restart;
54 struct b43_dfs_file file_loctls;
56 struct b43_txstatus_log txstatlog;
58 /* The cached address for the next mmio16read file read */
60 /* The cached address for the next mmio32read file read */
63 /* The cached address for the next shm16read file read */
64 u32 shm16read_routing_next;
65 u32 shm16read_addr_next;
66 /* The cached address for the next shm32read file read */
67 u32 shm32read_routing_next;
68 u32 shm32read_addr_next;
70 /* Enabled/Disabled list for the dynamic debugging features. */
71 bool dyn_debug[__B43_NR_DYNDBG];
74 bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature);
76 void b43_debugfs_init(void);
77 void b43_debugfs_exit(void);
78 void b43_debugfs_add_device(struct b43_wldev *dev);
79 void b43_debugfs_remove_device(struct b43_wldev *dev);
80 void b43_debugfs_log_txstat(struct b43_wldev *dev,
81 const struct b43_txstatus *status);
83 #else /* CONFIG_B43_DEBUG */
85 static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
90 static inline void b43_debugfs_init(void)
93 static inline void b43_debugfs_exit(void)
96 static inline void b43_debugfs_add_device(struct b43_wldev *dev)
99 static inline void b43_debugfs_remove_device(struct b43_wldev *dev)
102 static inline void b43_debugfs_log_txstat(struct b43_wldev *dev,
103 const struct b43_txstatus *status)
107 #endif /* CONFIG_B43_DEBUG */
109 #endif /* B43_DEBUGFS_H_ */