1
2
3
4#ifndef __RTW_DEBUG_H__
5#define __RTW_DEBUG_H__
6
7#include "osdep_service.h"
8#include "drv_types.h"
9
10#define _drv_always_ 1
11#define _drv_emerg_ 2
12#define _drv_alert_ 3
13#define _drv_crit_ 4
14#define _drv_err_ 5
15#define _drv_warning_ 6
16#define _drv_notice_ 7
17#define _drv_info_ 8
18#define _drv_debug_ 9
19
20#define _module_rtl871x_xmit_c_ BIT(0)
21#define _module_xmit_osdep_c_ BIT(1)
22#define _module_rtl871x_recv_c_ BIT(2)
23#define _module_recv_osdep_c_ BIT(3)
24#define _module_rtl871x_mlme_c_ BIT(4)
25#define _module_mlme_osdep_c_ BIT(5)
26#define _module_rtl871x_sta_mgt_c_ BIT(6)
27#define _module_rtl871x_cmd_c_ BIT(7)
28#define _module_cmd_osdep_c_ BIT(8)
29#define _module_rtl871x_io_c_ BIT(9)
30#define _module_io_osdep_c_ BIT(10)
31#define _module_os_intfs_c_ BIT(11)
32#define _module_rtl871x_security_c_ BIT(12)
33#define _module_rtl871x_eeprom_c_ BIT(13)
34#define _module_hal_init_c_ BIT(14)
35#define _module_hci_hal_init_c_ BIT(15)
36#define _module_rtl871x_ioctl_c_ BIT(16)
37#define _module_rtl871x_ioctl_set_c_ BIT(17)
38#define _module_rtl871x_ioctl_query_c_ BIT(18)
39#define _module_rtl871x_pwrctrl_c_ BIT(19)
40#define _module_hci_intfs_c_ BIT(20)
41#define _module_hci_ops_c_ BIT(21)
42#define _module_osdep_service_c_ BIT(22)
43#define _module_mp_ BIT(23)
44#define _module_hci_ops_os_c_ BIT(24)
45#define _module_rtl871x_ioctl_os_c BIT(25)
46#define _module_rtl8712_cmd_c_ BIT(26)
47#define _module_rtl8192c_xmit_c_ BIT(27)
48#define _module_hal_xmit_c_ BIT(28)
49#define _module_efuse_ BIT(29)
50#define _module_rtl8712_recv_c_ BIT(30)
51#define _module_rtl8712_led_c_ BIT(31)
52
53#define DRIVER_PREFIX "R8188EU: "
54
55extern u32 GlobalDebugLevel;
56
57#define DBG_88E_LEVEL(_level, fmt, arg...) \
58 do { \
59 if (_level <= GlobalDebugLevel) \
60 pr_info(DRIVER_PREFIX"INFO " fmt, ##arg); \
61 } while (0)
62
63#define DBG_88E(...) \
64 do { \
65 if (_drv_err_ <= GlobalDebugLevel) \
66 pr_info(DRIVER_PREFIX __VA_ARGS__); \
67 } while (0)
68
69#define MSG_88E(...) \
70 do { \
71 if (_drv_err_ <= GlobalDebugLevel) \
72 pr_info(DRIVER_PREFIX __VA_ARGS__); \
73 } while (0)
74
75int proc_get_drv_version(char *page, char **start,
76 off_t offset, int count,
77 int *eof, void *data);
78
79int proc_get_write_reg(char *page, char **start,
80 off_t offset, int count,
81 int *eof, void *data);
82
83int proc_set_write_reg(struct file *file, const char __user *buffer,
84 unsigned long count, void *data);
85int proc_get_read_reg(char *page, char **start,
86 off_t offset, int count,
87 int *eof, void *data);
88
89int proc_set_read_reg(struct file *file, const char __user *buffer,
90 unsigned long count, void *data);
91
92int proc_get_fwstate(char *page, char **start,
93 off_t offset, int count,
94 int *eof, void *data);
95int proc_get_sec_info(char *page, char **start,
96 off_t offset, int count,
97 int *eof, void *data);
98int proc_get_mlmext_state(char *page, char **start,
99 off_t offset, int count,
100 int *eof, void *data);
101
102int proc_get_qos_option(char *page, char **start,
103 off_t offset, int count,
104 int *eof, void *data);
105int proc_get_ht_option(char *page, char **start,
106 off_t offset, int count,
107 int *eof, void *data);
108int proc_get_rf_info(char *page, char **start,
109 off_t offset, int count,
110 int *eof, void *data);
111int proc_get_ap_info(char *page, char **start,
112 off_t offset, int count,
113 int *eof, void *data);
114
115int proc_get_adapter_state(char *page, char **start,
116 off_t offset, int count,
117 int *eof, void *data);
118
119int proc_get_trx_info(char *page, char **start,
120 off_t offset, int count,
121 int *eof, void *data);
122
123int proc_get_mac_reg_dump1(char *page, char **start,
124 off_t offset, int count,
125 int *eof, void *data);
126
127int proc_get_mac_reg_dump2(char *page, char **start,
128 off_t offset, int count,
129 int *eof, void *data);
130
131int proc_get_mac_reg_dump3(char *page, char **start,
132 off_t offset, int count,
133 int *eof, void *data);
134
135int proc_get_bb_reg_dump1(char *page, char **start,
136 off_t offset, int count,
137 int *eof, void *data);
138
139int proc_get_bb_reg_dump2(char *page, char **start,
140 off_t offset, int count,
141 int *eof, void *data);
142
143int proc_get_bb_reg_dump3(char *page, char **start,
144 off_t offset, int count,
145 int *eof, void *data);
146
147int proc_get_rf_reg_dump1(char *page, char **start,
148 off_t offset, int count,
149 int *eof, void *data);
150
151int proc_get_rf_reg_dump2(char *page, char **start,
152 off_t offset, int count,
153 int *eof, void *data);
154
155int proc_get_rf_reg_dump3(char *page, char **start,
156 off_t offset, int count,
157 int *eof, void *data);
158
159int proc_get_rf_reg_dump4(char *page, char **start,
160 off_t offset, int count,
161 int *eof, void *data);
162
163#ifdef CONFIG_88EU_AP_MODE
164
165int proc_get_all_sta_info(char *page, char **start,
166 off_t offset, int count,
167 int *eof, void *data);
168
169#endif
170
171int proc_get_best_channel(char *page, char **start,
172 off_t offset, int count,
173 int *eof, void *data);
174
175int proc_get_rx_signal(char *page, char **start,
176 off_t offset, int count,
177 int *eof, void *data);
178
179int proc_set_rx_signal(struct file *file, const char __user *buffer,
180 unsigned long count, void *data);
181
182int proc_get_ht_enable(char *page, char **start,
183 off_t offset, int count,
184 int *eof, void *data);
185
186int proc_set_ht_enable(struct file *file, const char __user *buffer,
187 unsigned long count, void *data);
188
189int proc_get_cbw40_enable(char *page, char **start,
190 off_t offset, int count,
191 int *eof, void *data);
192
193int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
194 unsigned long count, void *data);
195
196int proc_get_ampdu_enable(char *page, char **start,
197 off_t offset, int count,
198 int *eof, void *data);
199
200int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
201 unsigned long count, void *data);
202
203int proc_get_rx_stbc(char *page, char **start,
204 off_t offset, int count,
205 int *eof, void *data);
206
207int proc_set_rx_stbc(struct file *file, const char __user *buffer,
208 unsigned long count, void *data);
209
210int proc_get_two_path_rssi(char *page, char **start,
211 off_t offset, int count,
212 int *eof, void *data);
213
214int proc_get_rssi_disp(char *page, char **start,
215 off_t offset, int count,
216 int *eof, void *data);
217
218int proc_set_rssi_disp(struct file *file, const char __user *buffer,
219 unsigned long count, void *data);
220
221#ifdef CONFIG_BT_COEXIST
222int proc_get_btcoex_dbg(char *page, char **start,
223 off_t offset, int count,
224 int *eof, void *data);
225
226int proc_set_btcoex_dbg(struct file *file, const char *buffer,
227 signed long count, void *data);
228
229#endif
230
231#endif
232