-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbl_debugfs.h
73 lines (55 loc) · 1.81 KB
/
bl_debugfs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
******************************************************************************
*
* @file bl_debugfs.h
*
* @brief Miscellaneous utility function definitions
*
* Copyright (C) BouffaloLab 2017-2018
*
******************************************************************************
*/
#ifndef _BL_DEBUGFS_H_
#define _BL_DEBUGFS_H_
#include <linux/workqueue.h>
struct bl_hw;
struct bl_sta;
#ifdef CONFIG_BL_DEBUGFS
struct bl_debugfs {
unsigned long long rateidx;
struct dentry *dir;
bool trace_prst;
char helper_cmd[64];
bool helper_scheduled;
spinlock_t umh_lock;
bool unregistering;
#ifdef CONFIG_BL_FULLMAC
struct work_struct rc_stat_work;
uint8_t rc_sta[NX_REMOTE_STA_MAX];
uint8_t rc_write;
uint8_t rc_read;
struct dentry *dir_rc;
struct dentry *dir_sta[NX_REMOTE_STA_MAX];
#endif
};
int bl_dbgfs_register(struct bl_hw *bl_hw, const char *name);
void bl_dbgfs_unregister(struct bl_hw *bl_hw);
#ifdef CONFIG_BL_FULLMAC
void bl_dbgfs_register_rc_stat(struct bl_hw *bl_hw, struct bl_sta *sta);
void bl_dbgfs_unregister_rc_stat(struct bl_hw *bl_hw, struct bl_sta *sta);
#endif
void bl_dump_trace(struct bl_hw *bl_hw);
void bl_reset_trace(struct bl_hw *bl_hw);
#else
struct bl_debugfs {
};
static inline int bl_dbgfs_register(struct bl_hw *bl_hw, const char *name) { return 0; }
static inline void bl_dbgfs_unregister(struct bl_hw *bl_hw) {}
#ifdef CONFIG_BL_FULLMAC
static inline void bl_dbgfs_register_rc_stat(struct bl_hw *bl_hw, struct bl_sta *sta) {}
static inline void bl_dbgfs_unregister_rc_stat(struct bl_hw *bl_hw, struct bl_sta *sta) {}
#endif
void bl_dump_trace(struct bl_hw *bl_hw) {}
void bl_reset_trace(struct bl_hw *bl_hw) {}
#endif /* CONFIG_BL_DEBUGFS */
#endif /* _BL_DEBUGFS_H_ */