xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852be/include/rtw_debug.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2021 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 #ifndef __RTW_DEBUG_H__
16 #define __RTW_DEBUG_H__
17 
18 /* driver log level*/
19 enum {
20 	_DRV_NONE_ = 0,
21 	_DRV_ALWAYS_ = 1,
22 	_DRV_ERR_ = 2,
23 	_DRV_WARNING_ = 3,
24 	_DRV_INFO_ = 4,
25 	_DRV_DEBUG_ = 5,
26 	_DRV_MAX_ = 6
27 };
28 
29 #define DRIVER_PREFIX "RTW: "
30 
31 #define RTW_PRINT(x, ...) do {} while (0)
32 #define RTW_ERR(x, ...) do {} while (0)
33 #define RTW_WARN(x,...) do {} while (0)
34 #define RTW_INFO(x,...) do {} while (0)
35 #define RTW_DBG(x,...) do {} while (0)
36 #define RTW_PRINT_SEL(x,...) do {} while (0)
37 #define _RTW_PRINT(x, ...) do {} while (0)
38 #define _RTW_ERR(x, ...) do {} while (0)
39 #define _RTW_WARN(x,...) do {} while (0)
40 #define _RTW_INFO(x,...) do {} while (0)
41 #define _RTW_DBG(x,...) do {} while (0)
42 #define _RTW_PRINT_SEL(x,...) do {} while (0)
43 
44 #define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
45 #define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
46 #define RTW_PRINT_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
47 
48 #define RTW_DBG_EXPR(EXPR) do {} while (0)
49 
50 #define RTW_DBGDUMP 0 /* 'stream' for _dbgdump */
51 
52 
53 
54 #undef _dbgdump
55 #undef _seqdump
56 
57 #if defined(PLATFORM_LINUX)
58 	#ifdef DBG_THREAD_PID
59 	#define T_PID_FMT	"(%5u) "
60 	#define T_PID_ARG	current->pid
61 	#else /* !DBG_THREAD_PID */
62 	#define T_PID_FMT	"%s"
63 	#define T_PID_ARG	""
64 	#endif /* !DBG_THREAD_PID */
65 
66 	#ifdef DBG_CPU_INFO
67 	#define CPU_INFO_FMT	"[%u] "
68 	#define CPU_INFO_ARG	task_cpu(current)
69 	#else /* !DBG_CPU_INFO */
70 	#define CPU_INFO_FMT	"%s"
71 	#define CPU_INFO_ARG	""
72 	#endif /* !DBG_CPU_INFO */
73 
74 	/* Extra information in prefix */
75 	#define EX_INFO_FMT	T_PID_FMT CPU_INFO_FMT
76 	#define EX_INFO_ARG	T_PID_ARG, CPU_INFO_ARG
77 
78 	#define _dbgdump(fmt, arg...)	printk(EX_INFO_FMT fmt, EX_INFO_ARG, ##arg)
79 
80 	#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
81 	#define KERN_CONT
82 	#endif
83 	/*
84 	 * _dbgdump_c() default use KERN_CONT flag, so it would not print
85 	 * messages with a new line. Usually use it if you want to continue
86 	 * a line.
87 	 */
88 	#define _dbgdump_c(fmt, arg...)	printk(KERN_CONT fmt, ##arg)
89 	#define _seqdump seq_printf
90 #elif defined(PLATFORM_FREEBSD)
91 	#define _dbgdump printf
92 	#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
93 	#define KERN_CONT
94 	#endif
95 	#define _dbgdump_c(fmt, arg...)	printf(KERN_CONT fmt, ##arg)
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 void RTW_BUF_DUMP_SEL_ALWAYS(void *sel, u8 *_titlestring,
102 			bool _idx_show, const u8 *_hexdata, int _hexdatalen);
103 
104 #ifdef CONFIG_RTW_DEBUG
105 
106 /*#ifndef _OS_INTFS_C_*/
107 extern uint rtw_drv_log_level;
108 /*#endif*/
109 
110 #if defined(_dbgdump)
111 
112 /* with driver-defined prefix */
113 #undef RTW_PRINT
114 #define RTW_PRINT(fmt, arg...)     \
115 	do {\
116 		if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
117 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
118 		} \
119 	} while (0)
120 
121 #undef RTW_ERR
122 #define RTW_ERR(fmt, arg...)     \
123 	do {\
124 		if (_DRV_ERR_ <= rtw_drv_log_level) {\
125 			_dbgdump(DRIVER_PREFIX "ERROR " fmt, ##arg);\
126 		} \
127 	} while (0)
128 
129 
130 #undef RTW_WARN
131 #define RTW_WARN(fmt, arg...)     \
132 	do {\
133 		if (_DRV_WARNING_ <= rtw_drv_log_level) {\
134 			_dbgdump(DRIVER_PREFIX "WARN " fmt, ##arg);\
135 		} \
136 	} while (0)
137 
138 #undef RTW_INFO
139 #define RTW_INFO(fmt, arg...)     \
140 	do {\
141 		if (_DRV_INFO_ <= rtw_drv_log_level) {\
142 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
143 		} \
144 	} while (0)
145 
146 
147 #undef RTW_DBG
148 #define RTW_DBG(fmt, arg...)     \
149 	do {\
150 		if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
151 			_dbgdump(DRIVER_PREFIX fmt, ##arg);\
152 		} \
153 	} while (0)
154 
155 #undef RTW_INFO_DUMP
156 #define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen)	\
157 	RTW_BUF_DUMP_SEL(_DRV_INFO_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
158 
159 #undef RTW_DBG_DUMP
160 #define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen)	\
161 	RTW_BUF_DUMP_SEL(_DRV_DEBUG_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
162 
163 
164 #undef RTW_PRINT_DUMP
165 #define RTW_PRINT_DUMP(_TitleString, _HexData, _HexDataLen)	\
166 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, RTW_DBGDUMP, _TitleString, _FALSE, _HexData, _HexDataLen)
167 
168 /* without driver-defined prefix */
169 #undef _RTW_PRINT
170 #define _RTW_PRINT(fmt, arg...)     \
171 	do {\
172 		if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
173 			_dbgdump_c(fmt, ##arg);\
174 		} \
175 	} while (0)
176 
177 #undef _RTW_ERR
178 #define _RTW_ERR(fmt, arg...)     \
179 	do {\
180 		if (_DRV_ERR_ <= rtw_drv_log_level) {\
181 			_dbgdump_c(fmt, ##arg);\
182 		} \
183 	} while (0)
184 
185 
186 #undef _RTW_WARN
187 #define _RTW_WARN(fmt, arg...)     \
188 	do {\
189 		if (_DRV_WARNING_ <= rtw_drv_log_level) {\
190 			_dbgdump_c(fmt, ##arg);\
191 		} \
192 	} while (0)
193 
194 #undef _RTW_INFO
195 #define _RTW_INFO(fmt, arg...)     \
196 	do {\
197 		if (_DRV_INFO_ <= rtw_drv_log_level) {\
198 			_dbgdump_c(fmt, ##arg);\
199 		} \
200 	} while (0)
201 
202 #undef _RTW_DBG
203 #define _RTW_DBG(fmt, arg...)     \
204 	do {\
205 		if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
206 			_dbgdump_c(fmt, ##arg);\
207 		} \
208 	} while (0)
209 
210 
211 /* other debug APIs */
212 #undef RTW_DBG_EXPR
213 #define RTW_DBG_EXPR(EXPR) do { if (_DRV_DEBUG_ <= rtw_drv_log_level) EXPR; } while (0)
214 
215 #endif /* defined(_dbgdump) */
216 #endif /* CONFIG_RTW_DEBUG */
217 
218 
219 #if defined(_seqdump)
220 /* dump message to selected 'stream' with driver-defined prefix */
221 #undef RTW_PRINT_SEL
222 #define RTW_PRINT_SEL(sel, fmt, arg...) \
223 	do {\
224 		if (sel == RTW_DBGDUMP)\
225 			RTW_PRINT(fmt, ##arg); \
226 		else {\
227 			_seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
228 		} \
229 	} while (0)
230 
231 /* dump message to selected 'stream' */
232 #undef _RTW_PRINT_SEL
233 #define _RTW_PRINT_SEL(sel, fmt, arg...) \
234 	do {\
235 		if (sel == RTW_DBGDUMP)\
236 			_RTW_PRINT(fmt, ##arg); \
237 		else {\
238 			_seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
239 		} \
240 	} while (0)
241 
242 /* dump message to selected 'stream' */
243 #undef RTW_DUMP_SEL
244 #define RTW_DUMP_SEL(sel, _HexData, _HexDataLen) \
245 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, sel, NULL, _FALSE, _HexData, _HexDataLen)
246 
247 #define RTW_MAP_DUMP_SEL(sel, _TitleString, _HexData, _HexDataLen) \
248 	RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, sel, _TitleString, _TRUE, _HexData, _HexDataLen)
249 
250 #define RTW_MAP_DUMP_SEL_ALWAYS(sel, _TitleString, _HexData, _HexDataLen) \
251 	RTW_BUF_DUMP_SEL_ALWAYS(sel, _TitleString, _TRUE, _HexData, _HexDataLen)
252 
253 #endif /* defined(_seqdump) */
254 
255 
256 #ifdef CONFIG_DBG_COUNTER
257 	#define DBG_COUNTER(counter) counter++
258 #else
259 	#define DBG_COUNTER(counter)
260 #endif
261 
262 void dump_drv_version(void *sel);
263 void dump_log_level(void *sel);
264 void dump_drv_cfg(void *sel);
265 
266 void rtw_sink_rtp_seq_dbg(_adapter *adapter, u8 *ehdr_pos);
267 
268 #ifdef CONFIG_RECV_REORDERING_CTRL
269 struct sta_info;
270 void sta_rx_reorder_ctl_dump(void *sel, struct sta_info *sta);
271 #endif
272 struct dvobj_priv;
273 void dump_tx_rate_bmp(void *sel, struct dvobj_priv *dvobj);
274 void dump_adapters_status(void *sel, struct dvobj_priv *dvobj);
275 
276 struct sec_cam_ent;
277 void dump_sec_cam_ent(void *sel, struct sec_cam_ent *ent, int id);
278 void dump_sec_cam_ent_title(void *sel, u8 has_id);
279 void dump_sec_cam(void *sel, _adapter *adapter);
280 void dump_sec_cam_cache(void *sel, _adapter *adapter);
281 
282 bool rtw_del_rx_ampdu_test_trigger_no_tx_fail(void);
283 u32 rtw_get_wait_hiq_empty_ms(void);
284 void rtw_sta_linking_test_set_start(void);
285 bool rtw_sta_linking_test_wait_done(void);
286 bool rtw_sta_linking_test_force_fail(void);
287 #ifdef CONFIG_AP_MODE
288 u16 rtw_ap_linking_test_force_auth_fail(void);
289 u16 rtw_ap_linking_test_force_asoc_fail(void);
290 #endif
291 
292 #ifdef CONFIG_PROC_DEBUG
293 ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
294 int proc_get_read_reg(struct seq_file *m, void *v);
295 ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
296 
297 #ifdef CONFIG_IGNORE_GO_AND_LOW_RSSI_IN_SCAN_LIST
298 int proc_get_ignore_go_and_low_rssi_in_scan(struct seq_file *m, void *v);
299 ssize_t proc_set_ignore_go_and_low_rssi_in_scan(struct file *file,
300 	const char __user *buffer, size_t count, loff_t *pos, void *data);
301 #endif /*CONFIG_IGNORE_GO_AND_LOW_RSSI_IN_SCAN_LIST*/
302 
303 ssize_t proc_set_mac_dbg_status_dump(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
304 
305 int proc_get_fwstate(struct seq_file *m, void *v);
306 int proc_get_sec_info(struct seq_file *m, void *v);
307 int proc_get_mlmext_state(struct seq_file *m, void *v);
308 #ifdef CONFIG_LAYER2_ROAMING
309 int proc_get_roam_flags(struct seq_file *m, void *v);
310 ssize_t proc_set_roam_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
311 int proc_get_roam_param(struct seq_file *m, void *v);
312 ssize_t proc_set_roam_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
313 ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
314 #endif /* CONFIG_LAYER2_ROAMING */
315 int proc_get_qos_option(struct seq_file *m, void *v);
316 int proc_get_ht_option(struct seq_file *m, void *v);
317 int proc_get_rf_info(struct seq_file *m, void *v);
318 int proc_get_scan_param(struct seq_file *m, void *v);
319 ssize_t proc_set_scan_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
320 int proc_get_scan_abort(struct seq_file *m, void *v);
321 ssize_t proc_set_scan_abort(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
322 
323 int proc_get_survey_info(struct seq_file *m, void *v);
324 ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
325 int proc_get_ap_info(struct seq_file *m, void *v);
326 #ifdef ROKU_PRIVATE
327 int proc_get_infra_ap(struct seq_file *m, void *v);
328 #endif /* ROKU_PRIVATE */
329 ssize_t proc_reset_trx_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
330 int proc_get_trx_info(struct seq_file *m, void *v);
331 ssize_t proc_set_tx_power_offset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
332 int proc_get_tx_power_offset(struct seq_file *m, void *v);
333 int proc_get_rate_ctl(struct seq_file *m, void *v);
334 int proc_get_wifi_spec(struct seq_file *m, void *v);
335 ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
336 int proc_get_bw_ctl(struct seq_file *m, void *v);
337 ssize_t proc_set_bw_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
338 #ifdef DBG_RX_COUNTER_DUMP
339 int proc_get_rx_cnt_dump(struct seq_file *m, void *v);
340 ssize_t proc_set_rx_cnt_dump(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
341 #endif
342 
343 #ifdef CONFIG_AP_MODE
344 int proc_get_bmc_tx_rate(struct seq_file *m, void *v);
345 ssize_t proc_set_bmc_tx_rate(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
346 #endif /*CONFIG_AP_MODE*/
347 
348 int proc_get_ps_dbg_info(struct seq_file *m, void *v);
349 ssize_t proc_set_ps_dbg_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
350 
351 ssize_t proc_set_del_rx_ampdu_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
352 ssize_t proc_set_wait_hiq_empty(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
353 ssize_t proc_set_sta_linking_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
354 #ifdef CONFIG_AP_MODE
355 ssize_t proc_set_ap_linking_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
356 #endif
357 
358 struct sta_info;
359 int update_sta_stats(_adapter *adapter, struct sta_info *psta);
360 int proc_get_rx_stat(struct seq_file *m, void *v);
361 int proc_get_tx_stat(struct seq_file *m, void *v);
362 int proc_get_sta_tx_stat(struct seq_file *m, void *v);
363 ssize_t proc_set_sta_tx_stat(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
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 int proc_get_tx_quick_addba_req(struct seq_file *m, void *v);
430 ssize_t proc_set_tx_quick_addba_req(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
431 #ifdef CONFIG_TX_AMSDU
432 int proc_get_tx_amsdu(struct seq_file *m, void *v);
433 ssize_t proc_set_tx_amsdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
434 int proc_get_tx_amsdu_rate(struct seq_file *m, void *v);
435 ssize_t proc_set_tx_amsdu_rate(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
436 #endif
437 #endif /* CONFIG_80211N_HT */
438 
439 #ifdef CONFIG_80211AC_VHT
440 int proc_get_vht_24g_enable(struct seq_file *m, void *v);
441 ssize_t proc_set_vht_24g_enable(struct file *file, const char __user *buffer,
442 				size_t count, loff_t *pos, void *data);
443 #endif
444 
445 ssize_t proc_set_dyn_rrsr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
446 int proc_get_dyn_rrsr(struct seq_file *m, void *v);
447 
448 int proc_get_en_fwps(struct seq_file *m, void *v);
449 ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
450 
451 #if 0
452 int proc_get_two_path_rssi(struct seq_file *m, void *v);
453 int proc_get_rssi_disp(struct seq_file *m, void *v);
454 ssize_t proc_set_rssi_disp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
455 #endif
456 
457 #ifdef CONFIG_BTC
458 int proc_get_btc_dbg(struct seq_file *m, void *v);
459 ssize_t proc_set_btc_dbg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
460 int proc_get_btc_info(struct seq_file *m, void *v);
461 #endif /* CONFIG_BTC */
462 
463 #if defined(DBG_CONFIG_ERROR_DETECT)
464 int proc_get_sreset(struct seq_file *m, void *v);
465 ssize_t proc_set_sreset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
466 #endif /* DBG_CONFIG_ERROR_DETECT */
467 
468 int proc_get_phy_adaptivity(struct seq_file *m, void *v);
469 ssize_t proc_set_phy_adaptivity(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
470 
471 #ifdef CONFIG_DBG_COUNTER
472 int proc_get_rx_logs(struct seq_file *m, void *v);
473 int proc_get_tx_logs(struct seq_file *m, void *v);
474 int proc_get_int_logs(struct seq_file *m, void *v);
475 #endif
476 
477 #ifdef CONFIG_PCI_HCI
478 int proc_get_rx_ring(struct seq_file *m, void *v);
479 int proc_get_tx_ring(struct seq_file *m, void *v);
480 int proc_get_pci_aspm(struct seq_file *m, void *v);
481 int proc_get_pci_conf_space(struct seq_file *m, void *v);
482 ssize_t proc_set_pci_conf_space(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
483 
484 int proc_get_pci_bridge_conf_space(struct seq_file *m, void *v);
485 ssize_t proc_set_pci_bridge_conf_space(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
486 
487 
488 #ifdef DBG_TXBD_DESC_DUMP
489 int proc_get_tx_ring_ext(struct seq_file *m, void *v);
490 ssize_t proc_set_tx_ring_ext(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
491 #endif
492 #endif
493 
494 #ifdef CONFIG_WOWLAN
495 int proc_get_wow_enable(struct seq_file *m, void *v);
496 ssize_t proc_set_wow_enable(struct file *file, const char __user *buffer,
497 		size_t count, loff_t *pos, void *data);
498 int proc_get_pattern_info(struct seq_file *m, void *v);
499 ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer,
500 		size_t count, loff_t *pos, void *data);
501 int proc_get_wakeup_event(struct seq_file *m, void *v);
502 ssize_t proc_set_wakeup_event(struct file *file, const char __user *buffer,
503 		size_t count, loff_t *pos, void *data);
504 int proc_get_wakeup_reason(struct seq_file *m, void *v);
505 #endif
506 
507 #ifdef CONFIG_GPIO_WAKEUP
508 int proc_get_wowlan_gpio_info(struct seq_file *m, void *v);
509 ssize_t proc_set_wowlan_gpio_info(struct file *file, const char __user *buffer,
510 		size_t count, loff_t *pos, void *data);
511 #endif /*CONFIG_GPIO_WAKEUP*/
512 
513 #ifdef CONFIG_P2P_WOWLAN
514 int proc_get_p2p_wowlan_info(struct seq_file *m, void *v);
515 #endif /* CONFIG_P2P_WOWLAN */
516 
517 int proc_get_new_bcn_max(struct seq_file *m, void *v);
518 ssize_t proc_set_new_bcn_max(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
519 
520 #ifdef CONFIG_POWER_SAVING
521 int proc_get_ps_info(struct seq_file *m, void *v);
522 ssize_t proc_set_ps_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
523 #ifdef CONFIG_WMMPS_STA
524 int proc_get_wmmps_info(struct seq_file *m, void *v);
525 ssize_t proc_set_wmmps_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
526 #endif /* CONFIG_WMMPS_STA */
527 #endif /* CONFIG_POWER_SAVING */
528 
529 #ifdef CONFIG_TDLS
530 int proc_get_tdls_enable(struct seq_file *m, void *v);
531 ssize_t proc_set_tdls_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
532 int proc_get_tdls_info(struct seq_file *m, void *v);
533 #endif
534 
535 int proc_get_monitor(struct seq_file *m, void *v);
536 ssize_t proc_set_monitor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
537 
538 #ifdef DBG_XMIT_BLOCK
539 int proc_get_xmit_block(struct seq_file *m, void *v);
540 ssize_t proc_set_xmit_block(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
541 #endif
542 
543 #ifdef CONFIG_RTKM
544 int proc_get_rtkm_info(struct seq_file *m, void *v);
545 ssize_t proc_set_rtkm_info(struct file *file, const char __user *buffer,
546 			   size_t count, loff_t *pos, void *data);
547 #endif /* CONFIG_RTKM */
548 
549 #ifdef CONFIG_IEEE80211W
550 ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
551 int proc_get_tx_sa_query(struct seq_file *m, void *v);
552 ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
553 int proc_get_tx_deauth(struct seq_file *m, void *v);
554 ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
555 int proc_get_tx_auth(struct seq_file *m, void *v);
556 #endif /* CONFIG_IEEE80211W */
557 
558 #endif /* CONFIG_PROC_DEBUG */
559 
560 int proc_get_efuse_map(struct seq_file *m, void *v);
561 ssize_t proc_set_efuse_map(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
562 
563 int proc_get_ack_timeout(struct seq_file *m, void *v);
564 ssize_t proc_set_ack_timeout(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
565 
566 int proc_get_fw_offload(struct seq_file *m, void *v);
567 ssize_t proc_set_fw_offload(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
568 
569 
570 #ifdef CONFIG_DBG_RF_CAL
571 int proc_get_iqk_info(struct seq_file *m, void *v);
572 ssize_t proc_set_iqk(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
573 int proc_get_lck_info(struct seq_file *m, void *v);
574 ssize_t proc_set_lck(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
575 #endif /*CONFIG_DBG_RF_CAL*/
576 
577 #ifdef CONFIG_CTRL_TXSS_BY_TP
578 ssize_t proc_set_txss_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
579 int proc_get_txss_tp(struct seq_file *m, void *v);
580 #ifdef DBG_CTRL_TXSS
581 ssize_t proc_set_txss_ctrl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
582 int proc_get_txss_ctrl(struct seq_file *m, void *v);
583 #endif
584 #endif
585 
586 #ifdef CONFIG_LPS_CHK_BY_TP
587 ssize_t proc_set_lps_chk_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
588 int proc_get_lps_chk_tp(struct seq_file *m, void *v);
589 #endif
590 
591 #ifdef CONFIG_SUPPORT_STATIC_SMPS
592 ssize_t proc_set_smps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
593 int proc_get_smps(struct seq_file *m, void *v);
594 #endif
595 
596 int proc_get_defs_param(struct seq_file *m, void *v);
597 ssize_t proc_set_defs_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
598 
599 #ifdef RTW_DETECT_HANG
600 int proc_get_hang_info(struct seq_file *m, void *v);
601 #endif
602 
603 int proc_get_disconnect_info(struct seq_file *m, void *v);
604 ssize_t proc_set_disconnect_info(struct file *file, const char __user *buffer,
605 				 size_t count, loff_t *pos, void *data);
606 
607 int proc_get_chan(struct seq_file *m, void *v);
608 ssize_t proc_set_chan(struct file *file, const char __user *buffer,
609 				size_t count, loff_t *pos, void *data);
610 
611 int proc_get_mr_test(struct seq_file *m, void *v);
612 ssize_t proc_set_mr_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
613 int proc_get_deny_legacy(struct seq_file *m, void *v);
614 ssize_t proc_set_deny_legacy(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
615 int proc_get_tx_ul_mu_disable(struct seq_file *m, void *v);
616 ssize_t proc_set_tx_ul_mu_disable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
617 
618 #define _drv_always_		1
619 #define _drv_emerg_			2
620 #define _drv_alert_			3
621 #define _drv_crit_			4
622 #define _drv_err_			5
623 #define _drv_warning_		6
624 #define _drv_notice_		7
625 #define _drv_info_			8
626 #define _drv_dump_			9
627 #define _drv_debug_			10
628 
629 #define _module_rtl871x_xmit_c_		BIT(0)
630 #define _module_xmit_osdep_c_		BIT(1)
631 #define _module_rtl871x_recv_c_		BIT(2)
632 #define _module_recv_osdep_c_		BIT(3)
633 #define _module_rtl871x_mlme_c_		BIT(4)
634 #define _module_mlme_osdep_c_		BIT(5)
635 #define _module_rtl871x_sta_mgt_c_		BIT(6)
636 #define _module_rtl871x_cmd_c_			BIT(7)
637 #define _module_cmd_osdep_c_		BIT(8)
638 #define _module_rtl871x_io_c_				BIT(9)
639 #define _module_io_osdep_c_		BIT(10)
640 #define _module_os_intfs_c_			BIT(11)
641 #define _module_rtl871x_security_c_		BIT(12)
642 #define _module_rtl871x_eeprom_c_			BIT(13)
643 #define _module_hal_init_c_		BIT(14)
644 #define _module_hci_hal_init_c_		BIT(15)
645 #define _module_rtl871x_ioctl_c_		BIT(16)
646 #define _module_rtl871x_ioctl_set_c_		BIT(17)
647 #define _module_rtl871x_ioctl_query_c_	BIT(18)
648 #define _module_rtl871x_pwrctrl_c_			BIT(19)
649 #define _module_hci_intfs_c_			BIT(20)
650 #define _module_hci_ops_c_			BIT(21)
651 #define _module_osdep_service_c_			BIT(22)
652 #define _module_mp_			BIT(23)
653 #define _module_hci_ops_os_c_			BIT(24)
654 #define _module_rtl871x_ioctl_os_c		BIT(25)
655 #define _module_rtl8712_cmd_c_		BIT(26)
656 /* #define _module_efuse_			BIT(27) */
657 #define	_module_rtl8192c_xmit_c_ BIT(28)
658 #define _module_hal_xmit_c_	BIT(28)
659 #define _module_efuse_			BIT(29)
660 #define _module_rtl8712_recv_c_		BIT(30)
661 #define _module_rtl8712_led_c_		BIT(31)
662 
663 #endif /* __RTW_DEBUG_H__ */
664