xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8189fs/include/rtw_debug.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 #ifndef __RTW_DEBUG_H__
17 #define __RTW_DEBUG_H__
18 
19 /* driver log level*/
20 enum {
21 	_DRV_NONE_ = 0,
22 	_DRV_ALWAYS_ = 1,
23 	_DRV_ERR_ = 2,
24 	_DRV_WARNING_ = 3,
25 	_DRV_INFO_ = 4,
26 	_DRV_DEBUG_ = 5,
27 	_DRV_MAX_ = 6
28 };
29 
30 #define DRIVER_PREFIX "RTW: "
31 
32 #ifdef PLATFORM_OS_CE
33 extern void rtl871x_cedbg(const char *fmt, ...);
34 #endif
35 
36 #ifdef PLATFORM_WINDOWS
37 	#define RTW_PRINT do {} while (0)
38 	#define RTW_ERR do {} while (0)
39 	#define RTW_WARN do {} while (0)
40 	#define RTW_INFO do {} while (0)
41 	#define RTW_DBG do {} while (0)
42 	#define RTW_PRINT_SEL do {} while (0)
43 	#define _RTW_PRINT do {} while (0)
44 	#define _RTW_ERR do {} while (0)
45 	#define _RTW_WARN do {} while (0)
46 	#define _RTW_INFO do {} while (0)
47 	#define _RTW_DBG do {} while (0)
48 	#define _RTW_PRINT_SEL do {} while (0)
49 #else
50 	#define RTW_PRINT(x, ...) do {} while (0)
51 	#define RTW_ERR(x, ...) do {} while (0)
52 	#define RTW_WARN(x,...) do {} while (0)
53 	#define RTW_INFO(x,...) do {} while (0)
54 	#define RTW_DBG(x,...) do {} while (0)
55 	#define RTW_PRINT_SEL(x,...) do {} while (0)
56 	#define _RTW_PRINT(x, ...) do {} while (0)
57 	#define _RTW_ERR(x, ...) do {} while (0)
58 	#define _RTW_WARN(x,...) do {} while (0)
59 	#define _RTW_INFO(x,...) do {} while (0)
60 	#define _RTW_DBG(x,...) do {} while (0)
61 	#define _RTW_PRINT_SEL(x,...) do {} while (0)
62 #endif
63 
64 #define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
65 #define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
66 #define RTW_PRINT_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
67 
68 #define RTW_DBG_EXPR(EXPR) do {} while (0)
69 
70 #define RTW_DBGDUMP 0 /* 'stream' for _dbgdump */
71 
72 
73 
74 #undef _dbgdump
75 #undef _seqdump
76 
77 #if defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_XP)
78 	#define _dbgdump DbgPrint
79 	#define KERN_CONT
80 	#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
81 #elif defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_CE)
82 	#define _dbgdump rtl871x_cedbg
83 	#define KERN_CONT
84 	#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
85 #elif defined PLATFORM_LINUX
86 	#define _dbgdump printk
87 	#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
88 	#define KERN_CONT
89 	#endif
90 	#define _seqdump seq_printf
91 #elif defined PLATFORM_FREEBSD
92 	#define _dbgdump printf
93 	#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
94 	#define KERN_CONT
95 	#endif
96 	#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
97 #endif
98 
99 void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
100 								bool _idx_show, const u8 *_hexdata, int _hexdatalen);
101 
102 #ifdef CONFIG_RTW_DEBUG
103 
104 #ifndef _OS_INTFS_C_
105 extern uint rtw_drv_log_level;
106 #endif
107 
108 #if defined(_dbgdump)
109 
110 /* with driver-defined prefix */
111 #undef RTW_PRINT
112 #define RTW_PRINT(fmt, arg...)     \
113 	do {\
114 		if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
115 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
116 		} \
117 	} while (0)
118 
119 #undef RTW_ERR
120 #define RTW_ERR(fmt, arg...)     \
121 	do {\
122 		if (_DRV_ERR_ <= rtw_drv_log_level) {\
123 			_dbgdump(DRIVER_PREFIX"ERROR " fmt, ##arg);\
124 		} \
125 	} while (0)
126 
127 
128 #undef RTW_WARN
129 #define RTW_WARN(fmt, arg...)     \
130 	do {\
131 		if (_DRV_WARNING_ <= rtw_drv_log_level) {\
132 			_dbgdump(DRIVER_PREFIX"WARN " fmt, ##arg);\
133 		} \
134 	} while (0)
135 
136 #undef RTW_INFO
137 #define RTW_INFO(fmt, arg...)     \
138 	do {\
139 		if (_DRV_INFO_ <= rtw_drv_log_level) {\
140 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
141 		} \
142 	} while (0)
143 
144 
145 #undef RTW_DBG
146 #define RTW_DBG(fmt, arg...)     \
147 	do {\
148 		if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
149 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
150 		} \
151 	} while (0)
152 
153 #undef RTW_INFO_DUMP
154 #define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen)	\
155 	RTW_BUF_DUMP_SEL(_DRV_INFO_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
156 
157 #undef RTW_DBG_DUMP
158 #define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen)	\
159 	RTW_BUF_DUMP_SEL(_DRV_DEBUG_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
160 
161 
162 #undef RTW_PRINT_DUMP
163 #define RTW_PRINT_DUMP(_TitleString, _HexData, _HexDataLen)	\
164 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
165 
166 /* without driver-defined prefix */
167 #undef _RTW_PRINT
168 #define _RTW_PRINT(fmt, arg...)     \
169 	do {\
170 		if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
171 			_dbgdump(KERN_CONT fmt, ##arg);\
172 		} \
173 	} while (0)
174 
175 #undef _RTW_ERR
176 #define _RTW_ERR(fmt, arg...)     \
177 	do {\
178 		if (_DRV_ERR_ <= rtw_drv_log_level) {\
179 			_dbgdump(KERN_CONT fmt, ##arg);\
180 		} \
181 	} while (0)
182 
183 
184 #undef _RTW_WARN
185 #define _RTW_WARN(fmt, arg...)     \
186 	do {\
187 		if (_DRV_WARNING_ <= rtw_drv_log_level) {\
188 			_dbgdump(KERN_CONT fmt, ##arg);\
189 		} \
190 	} while (0)
191 
192 #undef _RTW_INFO
193 #define _RTW_INFO(fmt, arg...)     \
194 	do {\
195 		if (_DRV_INFO_ <= rtw_drv_log_level) {\
196 			_dbgdump(KERN_CONT fmt, ##arg);\
197 		} \
198 	} while (0)
199 
200 #undef _RTW_DBG
201 #define _RTW_DBG(fmt, arg...)     \
202 	do {\
203 		if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
204 			_dbgdump(KERN_CONT fmt, ##arg);\
205 		} \
206 	} while (0)
207 
208 
209 /* other debug APIs */
210 #undef RTW_DBG_EXPR
211 #define RTW_DBG_EXPR(EXPR) do { if (_DRV_DEBUG_ <= rtw_drv_log_level) EXPR; } while (0)
212 
213 #endif /* defined(_dbgdump) */
214 #endif /* CONFIG_RTW_DEBUG */
215 
216 
217 #if defined(_seqdump)
218 /* dump message to selected 'stream' with driver-defined prefix */
219 #undef RTW_PRINT_SEL
220 #define RTW_PRINT_SEL(sel, fmt, arg...) \
221 	do {\
222 		if (sel == RTW_DBGDUMP)\
223 			RTW_PRINT(fmt, ##arg); \
224 		else {\
225 			_seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
226 		} \
227 	} while (0)
228 
229 /* dump message to selected 'stream' */
230 #undef _RTW_PRINT_SEL
231 #define _RTW_PRINT_SEL(sel, fmt, arg...) \
232 	do {\
233 		if (sel == RTW_DBGDUMP)\
234 			_RTW_PRINT(fmt, ##arg); \
235 		else {\
236 			_seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
237 		} \
238 	} while (0)
239 
240 /* dump message to selected 'stream' */
241 #undef RTW_DUMP_SEL
242 #define RTW_DUMP_SEL(sel, _HexData, _HexDataLen) \
243 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, sel, NULL, _FALSE, _HexData, _HexDataLen)
244 
245 #define RTW_MAP_DUMP_SEL(sel, _TitleString, _HexData, _HexDataLen) \
246 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, sel, _TitleString, _TRUE, _HexData, _HexDataLen)
247 #endif /* defined(_seqdump) */
248 
249 
250 #ifdef CONFIG_DBG_COUNTER
251 	#define DBG_COUNTER(counter) counter++
252 #else
253 	#define DBG_COUNTER(counter)
254 #endif
255 
256 void dump_drv_version(void *sel);
257 void dump_log_level(void *sel);
258 void dump_drv_cfg(void *sel);
259 
260 #ifdef CONFIG_SDIO_HCI
261 void sd_f0_reg_dump(void *sel, _adapter *adapter);
262 void sdio_local_reg_dump(void *sel, _adapter *adapter);
263 #endif /* CONFIG_SDIO_HCI */
264 
265 void mac_reg_dump(void *sel, _adapter *adapter);
266 void bb_reg_dump(void *sel, _adapter *adapter);
267 void bb_reg_dump_ex(void *sel, _adapter *adapter);
268 void rf_reg_dump(void *sel, _adapter *adapter);
269 
270 void rtw_sink_rtp_seq_dbg(_adapter *adapter, u8 *ehdr_pos);
271 
272 struct sta_info;
273 void sta_rx_reorder_ctl_dump(void *sel, struct sta_info *sta);
274 
275 struct dvobj_priv;
276 void dump_tx_rate_bmp(void *sel, struct dvobj_priv *dvobj);
277 void dump_adapters_status(void *sel, struct dvobj_priv *dvobj);
278 
279 struct sec_cam_ent;
280 void dump_sec_cam_ent(void *sel, struct sec_cam_ent *ent, int id);
281 void dump_sec_cam_ent_title(void *sel, u8 has_id);
282 void dump_sec_cam(void *sel, _adapter *adapter);
283 void dump_sec_cam_cache(void *sel, _adapter *adapter);
284 
285 bool rtw_fwdl_test_trigger_chksum_fail(void);
286 bool rtw_fwdl_test_trigger_wintint_rdy_fail(void);
287 bool rtw_del_rx_ampdu_test_trigger_no_tx_fail(void);
288 u32 rtw_get_wait_hiq_empty_ms(void);
289 void rtw_sta_linking_test_set_start(void);
290 bool rtw_sta_linking_test_wait_done(void);
291 bool rtw_sta_linking_test_force_fail(void);
292 #ifdef CONFIG_AP_MODE
293 u16 rtw_ap_linking_test_force_auth_fail(void);
294 u16 rtw_ap_linking_test_force_asoc_fail(void);
295 #endif
296 
297 #ifdef CONFIG_PROC_DEBUG
298 ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
299 int proc_get_read_reg(struct seq_file *m, void *v);
300 ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
301 
302 int proc_get_fwstate(struct seq_file *m, void *v);
303 int proc_get_sec_info(struct seq_file *m, void *v);
304 int proc_get_mlmext_state(struct seq_file *m, void *v);
305 #ifdef CONFIG_LAYER2_ROAMING
306 int proc_get_roam_flags(struct seq_file *m, void *v);
307 ssize_t proc_set_roam_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
308 int proc_get_roam_param(struct seq_file *m, void *v);
309 ssize_t proc_set_roam_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
310 ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
311 #endif /* CONFIG_LAYER2_ROAMING */
312 #ifdef CONFIG_RTW_80211R
313 int proc_get_ft_flags(struct seq_file *m, void *v);
314 ssize_t proc_set_ft_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
315 #endif
316 int proc_get_qos_option(struct seq_file *m, void *v);
317 int proc_get_ht_option(struct seq_file *m, void *v);
318 int proc_get_rf_info(struct seq_file *m, void *v);
319 int proc_get_scan_param(struct seq_file *m, void *v);
320 ssize_t proc_set_scan_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
321 int proc_get_scan_abort(struct seq_file *m, void *v);
322 #ifdef CONFIG_RTW_REPEATER_SON
323 int proc_get_rson_data(struct seq_file *m, void *v);
324 ssize_t proc_set_rson_data(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
325 #endif
326 int proc_get_survey_info(struct seq_file *m, void *v);
327 ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
328 int proc_get_ap_info(struct seq_file *m, void *v);
329 #ifdef ROKU_PRIVATE
330 int proc_get_infra_ap(struct seq_file *m, void *v);
331 #endif /* ROKU_PRIVATE */
332 ssize_t proc_reset_trx_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
333 int proc_get_trx_info(struct seq_file *m, void *v);
334 ssize_t proc_set_tx_power_offset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
335 int proc_get_tx_power_offset(struct seq_file *m, void *v);
336 int proc_get_rate_ctl(struct seq_file *m, void *v);
337 int proc_get_wifi_spec(struct seq_file *m, void *v);
338 ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
339 int proc_get_bw_ctl(struct seq_file *m, void *v);
340 ssize_t proc_set_bw_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
341 #ifdef DBG_RX_COUNTER_DUMP
342 int proc_get_rx_cnt_dump(struct seq_file *m, void *v);
343 ssize_t proc_set_rx_cnt_dump(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
344 #endif
345 
346 #ifdef CONFIG_AP_MODE
347 int proc_get_bmc_tx_rate(struct seq_file *m, void *v);
348 ssize_t proc_set_bmc_tx_rate(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
349 #endif /*CONFIG_AP_MODE*/
350 
351 int proc_get_ps_dbg_info(struct seq_file *m, void *v);
352 ssize_t proc_set_ps_dbg_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
353 
354 ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
355 ssize_t proc_set_del_rx_ampdu_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
356 ssize_t proc_set_wait_hiq_empty(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
357 ssize_t proc_set_sta_linking_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
358 #ifdef CONFIG_AP_MODE
359 ssize_t proc_set_ap_linking_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
360 #endif
361 
362 int proc_get_rx_stat(struct seq_file *m, void *v);
363 int proc_get_tx_stat(struct seq_file *m, void *v);
364 #ifdef CONFIG_AP_MODE
365 int proc_get_all_sta_info(struct seq_file *m, void *v);
366 #endif /* CONFIG_AP_MODE */
367 
368 #ifdef DBG_MEMORY_LEAK
369 int proc_get_malloc_cnt(struct seq_file *m, void *v);
370 #endif /* DBG_MEMORY_LEAK */
371 
372 #ifdef CONFIG_FIND_BEST_CHANNEL
373 int proc_get_best_channel(struct seq_file *m, void *v);
374 ssize_t proc_set_best_channel(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
375 #endif /* CONFIG_FIND_BEST_CHANNEL */
376 
377 int proc_get_trx_info_debug(struct seq_file *m, void *v);
378 
379 #ifdef CONFIG_HUAWEI_PROC
380 int proc_get_huawei_trx_info(struct seq_file *m, void *v);
381 #endif
382 
383 int proc_get_rx_signal(struct seq_file *m, void *v);
384 ssize_t proc_set_rx_signal(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
385 int proc_get_hw_status(struct seq_file *m, void *v);
386 ssize_t proc_set_hw_status(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
387 int proc_get_mac_rptbuf(struct seq_file *m, void *v);
388 
389 #ifdef CONFIG_80211N_HT
390 int proc_get_ht_enable(struct seq_file *m, void *v);
391 ssize_t proc_set_ht_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
392 
393 int proc_get_bw_mode(struct seq_file *m, void *v);
394 ssize_t proc_set_bw_mode(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
395 
396 int proc_get_ampdu_enable(struct seq_file *m, void *v);
397 ssize_t proc_set_ampdu_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
398 
399 void dump_regsty_rx_ampdu_size_limit(void *sel, _adapter *adapter);
400 int proc_get_rx_ampdu(struct seq_file *m, void *v);
401 ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
402 
403 void rtw_dump_dft_phy_cap(void *sel, _adapter *adapter);
404 void rtw_get_dft_phy_cap(void *sel, _adapter *adapter);
405 void rtw_dump_drv_phy_cap(void *sel, _adapter *adapter);
406 
407 int proc_get_rx_stbc(struct seq_file *m, void *v);
408 ssize_t proc_set_rx_stbc(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
409 int proc_get_stbc_cap(struct seq_file *m, void *v);
410 ssize_t proc_set_stbc_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
411 int proc_get_ldpc_cap(struct seq_file *m, void *v);
412 ssize_t proc_set_ldpc_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
413 #ifdef CONFIG_BEAMFORMING
414 int proc_get_txbf_cap(struct seq_file *m, void *v);
415 ssize_t proc_set_txbf_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
416 #endif
417 int proc_get_rx_ampdu_factor(struct seq_file *m, void *v);
418 ssize_t proc_set_rx_ampdu_factor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
419 
420 int proc_get_tx_max_agg_num(struct seq_file *m, void *v);
421 ssize_t proc_set_tx_max_agg_num(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
422 
423 int proc_get_rx_ampdu_density(struct seq_file *m, void *v);
424 ssize_t proc_set_rx_ampdu_density(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
425 
426 int proc_get_tx_ampdu_density(struct seq_file *m, void *v);
427 ssize_t proc_set_tx_ampdu_density(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
428 
429 #ifdef CONFIG_TX_AMSDU
430 int proc_get_tx_amsdu(struct seq_file *m, void *v);
431 ssize_t proc_set_tx_amsdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
432 int proc_get_tx_amsdu_rate(struct seq_file *m, void *v);
433 ssize_t proc_set_tx_amsdu_rate(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
434 #endif
435 #endif /* CONFIG_80211N_HT */
436 
437 int proc_get_en_fwps(struct seq_file *m, void *v);
438 ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
439 
440 #if 0
441 int proc_get_two_path_rssi(struct seq_file *m, void *v);
442 int proc_get_rssi_disp(struct seq_file *m, void *v);
443 ssize_t proc_set_rssi_disp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
444 #endif
445 
446 #ifdef CONFIG_BT_COEXIST
447 int proc_get_btcoex_dbg(struct seq_file *m, void *v);
448 ssize_t proc_set_btcoex_dbg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
449 int proc_get_btcoex_info(struct seq_file *m, void *v);
450 #ifdef CONFIG_RF4CE_COEXIST
451 int proc_get_rf4ce_state(struct seq_file *m, void *v);
452 ssize_t proc_set_rf4ce_state(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
453 #endif
454 #endif /* CONFIG_BT_COEXIST */
455 
456 #if defined(DBG_CONFIG_ERROR_DETECT)
457 int proc_get_sreset(struct seq_file *m, void *v);
458 ssize_t proc_set_sreset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
459 #endif /* DBG_CONFIG_ERROR_DETECT */
460 
461 int proc_get_odm_adaptivity(struct seq_file *m, void *v);
462 ssize_t proc_set_odm_adaptivity(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
463 
464 #ifdef CONFIG_DBG_COUNTER
465 int proc_get_rx_logs(struct seq_file *m, void *v);
466 int proc_get_tx_logs(struct seq_file *m, void *v);
467 int proc_get_int_logs(struct seq_file *m, void *v);
468 #endif
469 
470 #ifdef CONFIG_PCI_HCI
471 int proc_get_rx_ring(struct seq_file *m, void *v);
472 int proc_get_tx_ring(struct seq_file *m, void *v);
473 int proc_get_pci_aspm(struct seq_file *m, void *v);
474 int proc_get_pci_conf_space(struct seq_file *m, void *v);
475 ssize_t proc_set_pci_conf_space(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
476 
477 int proc_get_pci_bridge_conf_space(struct seq_file *m, void *v);
478 ssize_t proc_set_pci_bridge_conf_space(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
479 
480 
481 #ifdef DBG_TXBD_DESC_DUMP
482 int proc_get_tx_ring_ext(struct seq_file *m, void *v);
483 ssize_t proc_set_tx_ring_ext(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
484 #endif
485 #endif
486 
487 #ifdef CONFIG_WOWLAN
488 int proc_get_pattern_info(struct seq_file *m, void *v);
489 ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer,
490 		size_t count, loff_t *pos, void *data);
491 int proc_get_wakeup_event(struct seq_file *m, void *v);
492 ssize_t proc_set_wakeup_event(struct file *file, const char __user *buffer,
493 		size_t count, loff_t *pos, void *data);
494 int proc_get_wakeup_reason(struct seq_file *m, void *v);
495 #endif
496 
497 #ifdef CONFIG_GPIO_WAKEUP
498 int proc_get_wowlan_gpio_info(struct seq_file *m, void *v);
499 ssize_t proc_set_wowlan_gpio_info(struct file *file, const char __user *buffer,
500 		size_t count, loff_t *pos, void *data);
501 #endif /*CONFIG_GPIO_WAKEUP*/
502 
503 #ifdef CONFIG_P2P_WOWLAN
504 int proc_get_p2p_wowlan_info(struct seq_file *m, void *v);
505 #endif /* CONFIG_P2P_WOWLAN */
506 
507 int proc_get_new_bcn_max(struct seq_file *m, void *v);
508 ssize_t proc_set_new_bcn_max(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
509 
510 #ifdef CONFIG_POWER_SAVING
511 int proc_get_ps_info(struct seq_file *m, void *v);
512 ssize_t proc_set_ps_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
513 #ifdef CONFIG_WMMPS_STA
514 int proc_get_wmmps_info(struct seq_file *m, void *v);
515 ssize_t proc_set_wmmps_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
516 #endif /* CONFIG_WMMPS_STA */
517 #endif /* CONFIG_POWER_SAVING */
518 
519 #ifdef CONFIG_TDLS
520 int proc_get_tdls_enable(struct seq_file *m, void *v);
521 ssize_t proc_set_tdls_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
522 int proc_get_tdls_info(struct seq_file *m, void *v);
523 #endif
524 
525 int proc_get_monitor(struct seq_file *m, void *v);
526 ssize_t proc_set_monitor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
527 
528 #ifdef DBG_XMIT_BLOCK
529 int proc_get_xmit_block(struct seq_file *m, void *v);
530 ssize_t proc_set_xmit_block(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
531 #endif
532 
533 #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
534 int proc_get_rtkm_info(struct seq_file *m, void *v);
535 #endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
536 
537 #ifdef CONFIG_IEEE80211W
538 ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
539 int proc_get_tx_sa_query(struct seq_file *m, void *v);
540 ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
541 int proc_get_tx_deauth(struct seq_file *m, void *v);
542 ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
543 int proc_get_tx_auth(struct seq_file *m, void *v);
544 #endif /* CONFIG_IEEE80211W */
545 
546 #endif /* CONFIG_PROC_DEBUG */
547 
548 int proc_get_efuse_map(struct seq_file *m, void *v);
549 ssize_t proc_set_efuse_map(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
550 
551 #ifdef CONFIG_CUSTOMER01_SMART_ANTENNA
552 int proc_get_pathb_phase(struct seq_file *m, void *v);
553 ssize_t proc_set_pathb_phase(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
554 #endif
555 
556 #ifdef CONFIG_MCC_MODE
557 int proc_get_mcc_info(struct seq_file *m, void *v);
558 ssize_t proc_set_mcc_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
559 ssize_t proc_set_mcc_duration(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
560 #ifdef CONFIG_MCC_PHYDM_OFFLOAD
561 ssize_t proc_set_mcc_phydm_offload_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
562 #endif
563 ssize_t proc_set_mcc_single_tx_criteria(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
564 ssize_t proc_set_mcc_ap_bw20_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
565 ssize_t proc_set_mcc_ap_bw40_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
566 ssize_t proc_set_mcc_ap_bw80_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
567 ssize_t proc_set_mcc_sta_bw20_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
568 ssize_t proc_set_mcc_sta_bw40_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
569 ssize_t proc_set_mcc_sta_bw80_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
570 int proc_get_mcc_policy_table(struct seq_file *m, void *v);
571 #endif /* CONFIG_MCC_MODE */
572 
573 int proc_get_ack_timeout(struct seq_file *m, void *v);
574 ssize_t proc_set_ack_timeout(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
575 
576 int proc_get_fw_offload(struct seq_file *m, void *v);
577 ssize_t proc_set_fw_offload(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
578 
579 #ifdef CONFIG_FW_HANDLE_TXBCN
580 ssize_t proc_set_fw_tbtt_rpt(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
581 int proc_get_fw_tbtt_rpt(struct seq_file *m, void *v);
582 #endif
583 
584 #ifdef CONFIG_DBG_RF_CAL
585 int proc_get_iqk_info(struct seq_file *m, void *v);
586 ssize_t proc_set_iqk(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
587 int proc_get_lck_info(struct seq_file *m, void *v);
588 ssize_t proc_set_lck(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
589 #endif /*CONFIG_DBG_RF_CAL*/
590 
591 #ifdef CONFIG_CTRL_TXSS_BY_TP
592 ssize_t proc_set_txss_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
593 int proc_get_txss_tp(struct seq_file *m, void *v);
594 #ifdef DBG_CTRL_TXSS
595 ssize_t proc_set_txss_ctrl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
596 int proc_get_txss_ctrl(struct seq_file *m, void *v);
597 #endif
598 #endif
599 
600 #ifdef CONFIG_LPS_CHK_BY_TP
601 ssize_t proc_set_lps_chk_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
602 int proc_get_lps_chk_tp(struct seq_file *m, void *v);
603 #endif
604 
605 #ifdef CONFIG_SUPPORT_STATIC_SMPS
606 ssize_t proc_set_smps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
607 int proc_get_smps(struct seq_file *m, void *v);
608 #endif
609 
610 #define _drv_always_		1
611 #define _drv_emerg_			2
612 #define _drv_alert_			3
613 #define _drv_crit_			4
614 #define _drv_err_			5
615 #define _drv_warning_		6
616 #define _drv_notice_		7
617 #define _drv_info_			8
618 #define _drv_dump_			9
619 #define _drv_debug_			10
620 
621 #define _module_rtl871x_xmit_c_		BIT(0)
622 #define _module_xmit_osdep_c_		BIT(1)
623 #define _module_rtl871x_recv_c_		BIT(2)
624 #define _module_recv_osdep_c_		BIT(3)
625 #define _module_rtl871x_mlme_c_		BIT(4)
626 #define _module_mlme_osdep_c_		BIT(5)
627 #define _module_rtl871x_sta_mgt_c_		BIT(6)
628 #define _module_rtl871x_cmd_c_			BIT(7)
629 #define _module_cmd_osdep_c_		BIT(8)
630 #define _module_rtl871x_io_c_				BIT(9)
631 #define _module_io_osdep_c_		BIT(10)
632 #define _module_os_intfs_c_			BIT(11)
633 #define _module_rtl871x_security_c_		BIT(12)
634 #define _module_rtl871x_eeprom_c_			BIT(13)
635 #define _module_hal_init_c_		BIT(14)
636 #define _module_hci_hal_init_c_		BIT(15)
637 #define _module_rtl871x_ioctl_c_		BIT(16)
638 #define _module_rtl871x_ioctl_set_c_		BIT(17)
639 #define _module_rtl871x_ioctl_query_c_	BIT(18)
640 #define _module_rtl871x_pwrctrl_c_			BIT(19)
641 #define _module_hci_intfs_c_			BIT(20)
642 #define _module_hci_ops_c_			BIT(21)
643 #define _module_osdep_service_c_			BIT(22)
644 #define _module_mp_			BIT(23)
645 #define _module_hci_ops_os_c_			BIT(24)
646 #define _module_rtl871x_ioctl_os_c		BIT(25)
647 #define _module_rtl8712_cmd_c_		BIT(26)
648 /* #define _module_efuse_			BIT(27) */
649 #define	_module_rtl8192c_xmit_c_ BIT(28)
650 #define _module_hal_xmit_c_	BIT(28)
651 #define _module_efuse_			BIT(29)
652 #define _module_rtl8712_recv_c_		BIT(30)
653 #define _module_rtl8712_led_c_		BIT(31)
654 
655 #endif /* __RTW_DEBUG_H__ */
656