rtw_debug.h 24 KB

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