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