1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
14 ******************************************************************************/
15 #ifndef __RTW_DEBUG_H__
16 #define __RTW_DEBUG_H__
18 #include <osdep_service.h>
19 #include <drv_types.h>
21 #define DRIVERVERSION "v4.1.4_6773.20130222"
22 #define _drv_always_ 1
27 #define _drv_warning_ 6
28 #define _drv_notice_ 7
33 #define _module_rtl871x_xmit_c_ BIT(0)
34 #define _module_xmit_osdep_c_ BIT(1)
35 #define _module_rtl871x_recv_c_ BIT(2)
36 #define _module_recv_osdep_c_ BIT(3)
37 #define _module_rtl871x_mlme_c_ BIT(4)
38 #define _module_mlme_osdep_c_ BIT(5)
39 #define _module_rtl871x_sta_mgt_c_ BIT(6)
40 #define _module_rtl871x_cmd_c_ BIT(7)
41 #define _module_cmd_osdep_c_ BIT(8)
42 #define _module_rtl871x_io_c_ BIT(9)
43 #define _module_io_osdep_c_ BIT(10)
44 #define _module_os_intfs_c_ BIT(11)
45 #define _module_rtl871x_security_c_ BIT(12)
46 #define _module_rtl871x_eeprom_c_ BIT(13)
47 #define _module_hal_init_c_ BIT(14)
48 #define _module_hci_hal_init_c_ BIT(15)
49 #define _module_rtl871x_ioctl_c_ BIT(16)
50 #define _module_rtl871x_ioctl_set_c_ BIT(17)
51 #define _module_rtl871x_ioctl_query_c_ BIT(18)
52 #define _module_rtl871x_pwrctrl_c_ BIT(19)
53 #define _module_hci_intfs_c_ BIT(20)
54 #define _module_hci_ops_c_ BIT(21)
55 #define _module_osdep_service_c_ BIT(22)
56 #define _module_mp_ BIT(23)
57 #define _module_hci_ops_os_c_ BIT(24)
58 #define _module_rtl871x_ioctl_os_c BIT(25)
59 #define _module_rtl8712_cmd_c_ BIT(26)
60 #define _module_rtl8192c_xmit_c_ BIT(27)
61 #define _module_hal_xmit_c_ BIT(28)
62 #define _module_efuse_ BIT(29)
63 #define _module_rtl8712_recv_c_ BIT(30)
64 #define _module_rtl8712_led_c_ BIT(31)
66 #define DRIVER_PREFIX "R8188EU: "
68 extern u32 GlobalDebugLevel;
70 #define DBG_88E_LEVEL(_level, fmt, arg...) \
72 if (_level <= GlobalDebugLevel) \
73 pr_info(DRIVER_PREFIX fmt, ##arg); \
76 #define DBG_88E(...) \
78 if (_drv_err_ <= GlobalDebugLevel) \
79 pr_info(DRIVER_PREFIX __VA_ARGS__); \
82 #define MSG_88E(...) \
84 if (_drv_err_ <= GlobalDebugLevel) \
85 pr_info(DRIVER_PREFIX __VA_ARGS__); \
88 #define RT_TRACE(_comp, _level, fmt) \
90 if (_level <= GlobalDebugLevel) { \
91 pr_info("%s [0x%08x,%d]", DRIVER_PREFIX, \
92 (unsigned int)_comp, _level); \
97 #define RT_PRINT_DATA(_comp, _level, _titlestring, _hexdata, _hexdatalen)\
99 if (_level <= GlobalDebugLevel) { \
101 u8 *ptr = (u8 *)_hexdata; \
102 pr_info("%s", DRIVER_PREFIX); \
103 pr_info(_titlestring); \
104 for (__i = 0; __i < (int)_hexdatalen; __i++) { \
105 pr_info("%02X%s", ptr[__i], \
106 (((__i + 1) % 4) == 0) ? \
108 if (((__i + 1) % 16) == 0) \
115 int proc_get_drv_version(char *page, char **start,
116 off_t offset, int count,
117 int *eof, void *data);
119 int proc_get_write_reg(char *page, char **start,
120 off_t offset, int count,
121 int *eof, void *data);
123 int proc_set_write_reg(struct file *file, const char __user *buffer,
124 unsigned long count, void *data);
125 int proc_get_read_reg(char *page, char **start,
126 off_t offset, int count,
127 int *eof, void *data);
129 int proc_set_read_reg(struct file *file, const char __user *buffer,
130 unsigned long count, void *data);
132 int proc_get_adapter_state(char *page, char **start,
133 off_t offset, int count,
134 int *eof, void *data);
136 int proc_get_best_channel(char *page, char **start,
137 off_t offset, int count,
138 int *eof, void *data);
140 #endif /* __RTW_DEBUG_H__ */