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