rtw_debug.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __RTW_DEBUG_H__
  21. #define __RTW_DEBUG_H__
  22. /* driver log level*/
  23. enum {
  24. _DRV_NONE_ = 0,
  25. _DRV_ALWAYS_ = 1,
  26. _DRV_ERR_ = 2,
  27. _DRV_WARNING_ = 3,
  28. _DRV_INFO_ = 4,
  29. _DRV_DEBUG_ = 5,
  30. _DRV_MAX_ = 6
  31. };
  32. #define DRIVER_PREFIX "RTW: "
  33. #ifdef PLATFORM_OS_CE
  34. extern void rtl871x_cedbg(const char *fmt, ...);
  35. #endif
  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. #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. #define _RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
  67. #define _RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
  68. #define RTW_DBG_EXPR(EXPR) do {} while (0)
  69. #define RTW_DBGDUMP 0 /* 'stream' for _dbgdump */
  70. /* don't use these 3 APIs anymore, will be removed later */
  71. #define RT_TRACE(_Comp, _Level, Fmt) do {} while (0)
  72. #undef _dbgdump
  73. #undef _seqdump
  74. #if defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_XP)
  75. #define _dbgdump DbgPrint
  76. #define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
  77. #elif defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_CE)
  78. #define _dbgdump rtl871x_cedbg
  79. #define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
  80. #elif defined PLATFORM_LINUX
  81. #define _dbgdump printk
  82. #define _seqdump seq_printf
  83. #elif defined PLATFORM_FREEBSD
  84. #define _dbgdump printf
  85. #define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
  86. #endif
  87. #ifdef CONFIG_RTW_DEBUG
  88. #ifndef _OS_INTFS_C_
  89. extern uint rtw_drv_log_level;
  90. #endif
  91. #if defined(_dbgdump)
  92. /* with driver-defined prefix */
  93. #undef RTW_PRINT
  94. #define RTW_PRINT(fmt, arg...) \
  95. do {\
  96. if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
  97. _dbgdump(DRIVER_PREFIX fmt, ##arg);\
  98. } \
  99. } while (0)
  100. #undef RTW_ERR
  101. #define RTW_ERR(fmt, arg...) \
  102. do {\
  103. if (_DRV_ERR_ <= rtw_drv_log_level) {\
  104. _dbgdump(DRIVER_PREFIX"ERROR " fmt, ##arg);\
  105. } \
  106. } while (0)
  107. #undef RTW_WARN
  108. #define RTW_WARN(fmt, arg...) \
  109. do {\
  110. if (_DRV_WARNING_ <= rtw_drv_log_level) {\
  111. _dbgdump(DRIVER_PREFIX"WARN " fmt, ##arg);\
  112. } \
  113. } while (0)
  114. #undef RTW_INFO
  115. #define RTW_INFO(fmt, arg...) \
  116. do {\
  117. if (_DRV_INFO_ <= rtw_drv_log_level) {\
  118. _dbgdump(DRIVER_PREFIX fmt, ##arg);\
  119. } \
  120. } while (0)
  121. #undef RTW_DBG
  122. #define RTW_DBG(fmt, arg...) \
  123. do {\
  124. if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
  125. _dbgdump(DRIVER_PREFIX fmt, ##arg);\
  126. } \
  127. } while (0)
  128. #undef RTW_INFO_DUMP
  129. #define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) \
  130. do {\
  131. if (_DRV_INFO_ <= rtw_drv_log_level) { \
  132. int __i; \
  133. u8 *ptr = (u8 *)_HexData; \
  134. _dbgdump("%s", DRIVER_PREFIX); \
  135. _dbgdump(_TitleString); \
  136. for (__i = 0; __i < (int)_HexDataLen; __i++) { \
  137. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  138. if (((__i + 1) % 16) == 0) \
  139. _dbgdump("\n"); \
  140. } \
  141. _dbgdump("\n"); \
  142. } \
  143. } while (0)
  144. #undef RTW_DBG_DUMP
  145. #define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) \
  146. do {\
  147. if (_DRV_DEBUG_ <= rtw_drv_log_level) { \
  148. int __i; \
  149. u8 *ptr = (u8 *)_HexData; \
  150. _dbgdump("%s", DRIVER_PREFIX); \
  151. _dbgdump(_TitleString); \
  152. for (__i = 0; __i < (int)_HexDataLen; __i++) { \
  153. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  154. if (((__i + 1) % 16) == 0) \
  155. _dbgdump("\n"); \
  156. } \
  157. _dbgdump("\n"); \
  158. } \
  159. } while (0)
  160. #undef RTW_PRINT_DUMP
  161. #define RTW_PRINT_DUMP(_TitleString, _HexData, _HexDataLen) \
  162. do {\
  163. if (_DRV_ALWAYS_ <= rtw_drv_log_level) { \
  164. int __i; \
  165. u8 *ptr = (u8 *)_HexData; \
  166. _dbgdump("%s", DRIVER_PREFIX); \
  167. _dbgdump(_TitleString); \
  168. for (__i = 0; __i < (int)_HexDataLen; __i++) { \
  169. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  170. if (((__i + 1) % 16) == 0) \
  171. _dbgdump("\n"); \
  172. } \
  173. _dbgdump("\n"); \
  174. } \
  175. } while (0)
  176. /* without driver-defined prefix */
  177. #undef _RTW_PRINT
  178. #define _RTW_PRINT(fmt, arg...) \
  179. do {\
  180. if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
  181. _dbgdump(fmt, ##arg);\
  182. } \
  183. } while (0)
  184. #undef _RTW_ERR
  185. #define _RTW_ERR(fmt, arg...) \
  186. do {\
  187. if (_DRV_ERR_ <= rtw_drv_log_level) {\
  188. _dbgdump(fmt, ##arg);\
  189. } \
  190. } while (0)
  191. #undef _RTW_WARN
  192. #define _RTW_WARN(fmt, arg...) \
  193. do {\
  194. if (_DRV_WARNING_ <= rtw_drv_log_level) {\
  195. _dbgdump(fmt, ##arg);\
  196. } \
  197. } while (0)
  198. #undef _RTW_INFO
  199. #define _RTW_INFO(fmt, arg...) \
  200. do {\
  201. if (_DRV_INFO_ <= rtw_drv_log_level) {\
  202. _dbgdump(fmt, ##arg);\
  203. } \
  204. } while (0)
  205. #undef _RTW_DBG
  206. #define _RTW_DBG(fmt, arg...) \
  207. do {\
  208. if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
  209. _dbgdump(fmt, ##arg);\
  210. } \
  211. } while (0)
  212. #undef _RTW_INFO_DUMP
  213. #define _RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) \
  214. if (_DRV_INFO_ <= rtw_drv_log_level) { \
  215. int __i; \
  216. u8 *ptr = (u8 *)_HexData; \
  217. _dbgdump(_TitleString); \
  218. for (__i = 0; __i<(int)_HexDataLen; __i++) \
  219. { \
  220. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  221. if (((__i + 1) % 16) == 0) _dbgdump("\n"); \
  222. } \
  223. _dbgdump("\n"); \
  224. }
  225. #undef _RTW_DBG_DUMP
  226. #define _RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) \
  227. if (_DRV_DEBUG_ <= rtw_drv_log_level) { \
  228. int __i; \
  229. u8 *ptr = (u8 *)_HexData; \
  230. _dbgdump(_TitleString); \
  231. for (__i = 0; __i<(int)_HexDataLen; __i++) \
  232. { \
  233. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  234. if (((__i + 1) % 16) == 0) _dbgdump("\n"); \
  235. } \
  236. _dbgdump("\n"); \
  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. #endif /* defined(_dbgdump) */
  242. #endif /* CONFIG_RTW_DEBUG */
  243. #if defined(_seqdump)
  244. /* dump message to selected 'stream' with driver-defined prefix */
  245. #undef RTW_PRINT_SEL
  246. #define RTW_PRINT_SEL(sel, fmt, arg...) \
  247. do {\
  248. if (sel == RTW_DBGDUMP)\
  249. RTW_PRINT(fmt, ##arg); \
  250. else {\
  251. _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
  252. } \
  253. } while (0)
  254. /* dump message to selected 'stream' */
  255. #undef _RTW_PRINT_SEL
  256. #define _RTW_PRINT_SEL(sel, fmt, arg...) \
  257. do {\
  258. if (sel == RTW_DBGDUMP)\
  259. _RTW_PRINT(fmt, ##arg); \
  260. else {\
  261. _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
  262. } \
  263. } while (0)
  264. /* dump message to selected 'stream' */
  265. #undef _RTW_DUMP_SEL
  266. #define _RTW_DUMP_SEL(sel, _HexData, _HexDataLen) \
  267. do {\
  268. if (sel == RTW_DBGDUMP) {\
  269. int __i; \
  270. u8 *ptr = (u8 *)_HexData; \
  271. for (__i = 0; __i < (int)_HexDataLen; __i++) { \
  272. _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  273. if (((__i + 1) % 16) == 0) \
  274. _dbgdump("\n"); \
  275. } \
  276. _dbgdump("\n"); \
  277. } \
  278. else {\
  279. int __i; \
  280. u8 *ptr = (u8 *)_HexData; \
  281. for (__i = 0; __i < (int)_HexDataLen; __i++) { \
  282. _seqdump(sel, "%02X%s", ptr[__i], (((__i + 1) % 4) == 0) ? " " : " "); \
  283. if (((__i + 1) % 16) == 0) \
  284. _seqdump(sel, "\n"); \
  285. } \
  286. _seqdump(sel, "\n"); \
  287. } \
  288. } while (0)
  289. #endif /* defined(_seqdump) */
  290. #ifdef CONFIG_DBG_COUNTER
  291. #define DBG_COUNTER(counter) counter++
  292. #else
  293. #define DBG_COUNTER(counter)
  294. #endif
  295. void dump_drv_version(void *sel);
  296. void dump_log_level(void *sel);
  297. void dump_drv_cfg(void *sel);
  298. #ifdef CONFIG_SDIO_HCI
  299. void sd_f0_reg_dump(void *sel, _adapter *adapter);
  300. void sdio_local_reg_dump(void *sel, _adapter *adapter);
  301. #endif /* CONFIG_SDIO_HCI */
  302. void mac_reg_dump(void *sel, _adapter *adapter);
  303. void bb_reg_dump(void *sel, _adapter *adapter);
  304. void bb_reg_dump_ex(void *sel, _adapter *adapter);
  305. void rf_reg_dump(void *sel, _adapter *adapter);
  306. void rtw_sink_rtp_seq_dbg(_adapter *adapter, _pkt *pkt);
  307. struct sta_info;
  308. void sta_rx_reorder_ctl_dump(void *sel, struct sta_info *sta);
  309. struct dvobj_priv;
  310. void dump_tx_rate_bmp(void *sel, struct dvobj_priv *dvobj);
  311. void dump_adapters_status(void *sel, struct dvobj_priv *dvobj);
  312. struct sec_cam_ent;
  313. void dump_sec_cam_ent(void *sel, struct sec_cam_ent *ent, int id);
  314. void dump_sec_cam_ent_title(void *sel, u8 has_id);
  315. void dump_sec_cam(void *sel, _adapter *adapter);
  316. void dump_sec_cam_cache(void *sel, _adapter *adapter);
  317. #ifdef CONFIG_PROC_DEBUG
  318. ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  319. int proc_get_read_reg(struct seq_file *m, void *v);
  320. ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  321. int proc_get_fwstate(struct seq_file *m, void *v);
  322. int proc_get_sec_info(struct seq_file *m, void *v);
  323. int proc_get_mlmext_state(struct seq_file *m, void *v);
  324. #ifdef CONFIG_LAYER2_ROAMING
  325. int proc_get_roam_flags(struct seq_file *m, void *v);
  326. ssize_t proc_set_roam_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  327. int proc_get_roam_param(struct seq_file *m, void *v);
  328. ssize_t proc_set_roam_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  329. ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  330. #endif /* CONFIG_LAYER2_ROAMING */
  331. #ifdef CONFIG_RTW_80211R
  332. int proc_get_ft_flags(struct seq_file *m, void *v);
  333. ssize_t proc_set_ft_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  334. #endif
  335. int proc_get_qos_option(struct seq_file *m, void *v);
  336. int proc_get_ht_option(struct seq_file *m, void *v);
  337. int proc_get_rf_info(struct seq_file *m, void *v);
  338. int proc_get_scan_param(struct seq_file *m, void *v);
  339. ssize_t proc_set_scan_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  340. int proc_get_scan_abort(struct seq_file *m, void *v);
  341. #ifdef CONFIG_SCAN_BACKOP
  342. int proc_get_backop_flags_sta(struct seq_file *m, void *v);
  343. ssize_t proc_set_backop_flags_sta(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  344. int proc_get_backop_flags_ap(struct seq_file *m, void *v);
  345. ssize_t proc_set_backop_flags_ap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  346. #endif /* CONFIG_SCAN_BACKOP */
  347. int proc_get_survey_info(struct seq_file *m, void *v);
  348. ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  349. int proc_get_ap_info(struct seq_file *m, void *v);
  350. ssize_t proc_reset_trx_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  351. int proc_get_trx_info(struct seq_file *m, void *v);
  352. ssize_t proc_set_tx_power_offset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  353. int proc_get_tx_power_offset(struct seq_file *m, void *v);
  354. int proc_get_rate_ctl(struct seq_file *m, void *v);
  355. int proc_get_wifi_spec(struct seq_file *m, void *v);
  356. ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  357. int proc_get_bw_ctl(struct seq_file *m, void *v);
  358. ssize_t proc_set_bw_ctl(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  359. #ifdef DBG_RX_COUNTER_DUMP
  360. int proc_get_rx_cnt_dump(struct seq_file *m, void *v);
  361. ssize_t proc_set_rx_cnt_dump(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  362. #endif
  363. int proc_get_dis_pwt(struct seq_file *m, void *v);
  364. ssize_t proc_set_dis_pwt(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  365. int proc_get_ps_dbg_info(struct seq_file *m, void *v);
  366. ssize_t proc_set_ps_dbg_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  367. bool rtw_fwdl_test_trigger_chksum_fail(void);
  368. bool rtw_fwdl_test_trigger_wintint_rdy_fail(void);
  369. ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  370. bool rtw_del_rx_ampdu_test_trigger_no_tx_fail(void);
  371. ssize_t proc_set_del_rx_ampdu_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  372. #ifdef CONFIG_DFS_MASTER
  373. int proc_get_dfs_master_test_case(struct seq_file *m, void *v);
  374. ssize_t proc_set_dfs_master_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  375. #endif /* CONFIG_DFS_MASTER */
  376. u32 rtw_get_wait_hiq_empty_ms(void);
  377. ssize_t proc_set_wait_hiq_empty(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  378. void rtw_sta_linking_test_set_start(void);
  379. bool rtw_sta_linking_test_wait_done(void);
  380. bool rtw_sta_linking_test_force_fail(void);
  381. ssize_t proc_set_sta_linking_test(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  382. int proc_get_rx_stat(struct seq_file *m, void *v);
  383. int proc_get_tx_stat(struct seq_file *m, void *v);
  384. #ifdef CONFIG_AP_MODE
  385. int proc_get_all_sta_info(struct seq_file *m, void *v);
  386. #endif /* CONFIG_AP_MODE */
  387. #ifdef DBG_MEMORY_LEAK
  388. int proc_get_malloc_cnt(struct seq_file *m, void *v);
  389. #endif /* DBG_MEMORY_LEAK */
  390. #ifdef CONFIG_FIND_BEST_CHANNEL
  391. int proc_get_best_channel(struct seq_file *m, void *v);
  392. ssize_t proc_set_best_channel(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  393. #endif /* CONFIG_FIND_BEST_CHANNEL */
  394. int proc_get_trx_info_debug(struct seq_file *m, void *v);
  395. int proc_get_rx_signal(struct seq_file *m, void *v);
  396. ssize_t proc_set_rx_signal(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  397. int proc_get_hw_status(struct seq_file *m, void *v);
  398. ssize_t proc_set_hw_status(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  399. #ifdef CONFIG_80211N_HT
  400. int proc_get_ht_enable(struct seq_file *m, void *v);
  401. ssize_t proc_set_ht_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  402. int proc_get_bw_mode(struct seq_file *m, void *v);
  403. ssize_t proc_set_bw_mode(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  404. int proc_get_ampdu_enable(struct seq_file *m, void *v);
  405. ssize_t proc_set_ampdu_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  406. int proc_get_mac_rptbuf(struct seq_file *m, void *v);
  407. void dump_regsty_rx_ampdu_size_limit(void *sel, _adapter *adapter);
  408. int proc_get_rx_ampdu(struct seq_file *m, void *v);
  409. ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  410. void rtw_dump_dft_phy_cap(void *sel, _adapter *adapter);
  411. void rtw_get_dft_phy_cap(void *sel, _adapter *adapter);
  412. void rtw_dump_drv_phy_cap(void *sel, _adapter *adapter);
  413. int proc_get_rx_stbc(struct seq_file *m, void *v);
  414. ssize_t proc_set_rx_stbc(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  415. int proc_get_stbc_cap(struct seq_file *m, void *v);
  416. ssize_t proc_set_stbc_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  417. int proc_get_ldpc_cap(struct seq_file *m, void *v);
  418. ssize_t proc_set_ldpc_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  419. #ifdef CONFIG_BEAMFORMING
  420. int proc_get_txbf_cap(struct seq_file *m, void *v);
  421. ssize_t proc_set_txbf_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  422. #endif
  423. int proc_get_rx_ampdu_factor(struct seq_file *m, void *v);
  424. ssize_t proc_set_rx_ampdu_factor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  425. int proc_get_tx_max_agg_num(struct seq_file *m, void *v);
  426. ssize_t proc_set_tx_max_agg_num(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  427. int proc_get_rx_ampdu_density(struct seq_file *m, void *v);
  428. ssize_t proc_set_rx_ampdu_density(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  429. int proc_get_tx_ampdu_density(struct seq_file *m, void *v);
  430. ssize_t proc_set_tx_ampdu_density(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. int proc_get_en_fwps(struct seq_file *m, void *v);
  439. ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  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. #ifdef CONFIG_BT_COEXIST
  446. int proc_get_btcoex_dbg(struct seq_file *m, void *v);
  447. ssize_t proc_set_btcoex_dbg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  448. int proc_get_btcoex_info(struct seq_file *m, void *v);
  449. #ifdef CONFIG_RF4CE_COEXIST
  450. int proc_get_rf4ce_state(struct seq_file *m, void *v);
  451. ssize_t proc_set_rf4ce_state(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  452. #endif
  453. #endif /* CONFIG_BT_COEXIST */
  454. #if defined(DBG_CONFIG_ERROR_DETECT)
  455. int proc_get_sreset(struct seq_file *m, void *v);
  456. ssize_t proc_set_sreset(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  457. #endif /* DBG_CONFIG_ERROR_DETECT */
  458. int proc_get_odm_adaptivity(struct seq_file *m, void *v);
  459. ssize_t proc_set_odm_adaptivity(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  460. #ifdef CONFIG_DBG_COUNTER
  461. int proc_get_rx_logs(struct seq_file *m, void *v);
  462. int proc_get_tx_logs(struct seq_file *m, void *v);
  463. int proc_get_int_logs(struct seq_file *m, void *v);
  464. #endif
  465. #ifdef CONFIG_PCI_HCI
  466. int proc_get_rx_ring(struct seq_file *m, void *v);
  467. int proc_get_tx_ring(struct seq_file *m, void *v);
  468. int proc_get_pci_aspm(struct seq_file *m, void *v);
  469. #endif
  470. #ifdef CONFIG_WOWLAN
  471. int proc_get_pattern_info(struct seq_file *m, void *v);
  472. ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer,
  473. size_t count, loff_t *pos, void *data);
  474. int proc_get_wakeup_reason(struct seq_file *m, void *v);
  475. #endif
  476. #ifdef CONFIG_GPIO_WAKEUP
  477. int proc_get_wowlan_gpio_info(struct seq_file *m, void *v);
  478. ssize_t proc_set_wowlan_gpio_info(struct file *file, const char __user *buffer,
  479. size_t count, loff_t *pos, void *data);
  480. #endif /*CONFIG_GPIO_WAKEUP*/
  481. #ifdef CONFIG_P2P_WOWLAN
  482. int proc_get_p2p_wowlan_info(struct seq_file *m, void *v);
  483. #endif /* CONFIG_P2P_WOWLAN */
  484. int proc_get_new_bcn_max(struct seq_file *m, void *v);
  485. ssize_t proc_set_new_bcn_max(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  486. #ifdef CONFIG_POWER_SAVING
  487. int proc_get_ps_info(struct seq_file *m, void *v);
  488. #endif /* CONFIG_POWER_SAVING */
  489. #ifdef CONFIG_TDLS
  490. int proc_get_tdls_info(struct seq_file *m, void *v);
  491. #endif
  492. int proc_get_monitor(struct seq_file *m, void *v);
  493. ssize_t proc_set_monitor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  494. #ifdef DBG_XMIT_BLOCK
  495. int proc_get_xmit_block(struct seq_file *m, void *v);
  496. ssize_t proc_set_xmit_block(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  497. #endif
  498. #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
  499. int proc_get_rtkm_info(struct seq_file *m, void *v);
  500. #endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
  501. #ifdef CONFIG_IEEE80211W
  502. ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  503. int proc_get_tx_sa_query(struct seq_file *m, void *v);
  504. ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  505. int proc_get_tx_deauth(struct seq_file *m, void *v);
  506. ssize_t proc_set_tx_auth(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  507. int proc_get_tx_auth(struct seq_file *m, void *v);
  508. #endif /* CONFIG_IEEE80211W */
  509. #endif /* CONFIG_PROC_DEBUG */
  510. int proc_get_efuse_map(struct seq_file *m, void *v);
  511. ssize_t proc_set_efuse_map(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  512. #ifdef CONFIG_MCC_MODE
  513. int proc_get_mcc_info(struct seq_file *m, void *v);
  514. ssize_t proc_set_mcc_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  515. ssize_t proc_set_mcc_single_tx_criteria(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  516. ssize_t proc_set_mcc_ap_bw20_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  517. ssize_t proc_set_mcc_ap_bw40_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  518. ssize_t proc_set_mcc_ap_bw80_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  519. ssize_t proc_set_mcc_sta_bw20_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  520. ssize_t proc_set_mcc_sta_bw40_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  521. ssize_t proc_set_mcc_sta_bw80_target_tp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  522. int proc_get_mcc_policy_table(struct seq_file *m, void *v);
  523. ssize_t proc_set_mcc_policy_table(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  524. #endif /* CONFIG_MCC_MODE */
  525. int proc_get_ack_timeout(struct seq_file *m, void *v);
  526. ssize_t proc_set_ack_timeout(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
  527. #define _drv_always_ 1
  528. #define _drv_emerg_ 2
  529. #define _drv_alert_ 3
  530. #define _drv_crit_ 4
  531. #define _drv_err_ 5
  532. #define _drv_warning_ 6
  533. #define _drv_notice_ 7
  534. #define _drv_info_ 8
  535. #define _drv_dump_ 9
  536. #define _drv_debug_ 10
  537. #define _module_rtl871x_xmit_c_ BIT(0)
  538. #define _module_xmit_osdep_c_ BIT(1)
  539. #define _module_rtl871x_recv_c_ BIT(2)
  540. #define _module_recv_osdep_c_ BIT(3)
  541. #define _module_rtl871x_mlme_c_ BIT(4)
  542. #define _module_mlme_osdep_c_ BIT(5)
  543. #define _module_rtl871x_sta_mgt_c_ BIT(6)
  544. #define _module_rtl871x_cmd_c_ BIT(7)
  545. #define _module_cmd_osdep_c_ BIT(8)
  546. #define _module_rtl871x_io_c_ BIT(9)
  547. #define _module_io_osdep_c_ BIT(10)
  548. #define _module_os_intfs_c_ BIT(11)
  549. #define _module_rtl871x_security_c_ BIT(12)
  550. #define _module_rtl871x_eeprom_c_ BIT(13)
  551. #define _module_hal_init_c_ BIT(14)
  552. #define _module_hci_hal_init_c_ BIT(15)
  553. #define _module_rtl871x_ioctl_c_ BIT(16)
  554. #define _module_rtl871x_ioctl_set_c_ BIT(17)
  555. #define _module_rtl871x_ioctl_query_c_ BIT(18)
  556. #define _module_rtl871x_pwrctrl_c_ BIT(19)
  557. #define _module_hci_intfs_c_ BIT(20)
  558. #define _module_hci_ops_c_ BIT(21)
  559. #define _module_osdep_service_c_ BIT(22)
  560. #define _module_mp_ BIT(23)
  561. #define _module_hci_ops_os_c_ BIT(24)
  562. #define _module_rtl871x_ioctl_os_c BIT(25)
  563. #define _module_rtl8712_cmd_c_ BIT(26)
  564. /* #define _module_efuse_ BIT(27) */
  565. #define _module_rtl8192c_xmit_c_ BIT(28)
  566. #define _module_hal_xmit_c_ BIT(28)
  567. #define _module_efuse_ BIT(29)
  568. #define _module_rtl8712_recv_c_ BIT(30)
  569. #define _module_rtl8712_led_c_ BIT(31)
  570. #endif /* __RTW_DEBUG_H__ */