blob: 7ed4cada7efaf13c207aef9524d2d1cb82f16417 [file] [log] [blame]
Larry Finger475b922e2013-08-21 22:34:08 -05001/******************************************************************************
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 *
Larry Finger475b922e2013-08-21 22:34:08 -050014 ******************************************************************************/
15#ifndef __RTW_DEBUG_H__
16#define __RTW_DEBUG_H__
17
18#include <osdep_service.h>
19#include <drv_types.h>
20
navin patidarfdc95372014-06-01 17:46:29 +053021#define DRIVERVERSION "v4.1.4_6773.20130222"
Larry Finger475b922e2013-08-21 22:34:08 -050022#define _drv_always_ 1
23#define _drv_emerg_ 2
24#define _drv_alert_ 3
25#define _drv_crit_ 4
26#define _drv_err_ 5
27#define _drv_warning_ 6
28#define _drv_notice_ 7
29#define _drv_info_ 8
30#define _drv_debug_ 9
31
32
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)
65
66#define DRIVER_PREFIX "R8188EU: "
67
68extern u32 GlobalDebugLevel;
69
70#define DBG_88E_LEVEL(_level, fmt, arg...) \
71 do { \
72 if (_level <= GlobalDebugLevel) \
73 pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg); \
74 } while (0)
75
76#define DBG_88E(...) \
77 do { \
78 if (_drv_err_ <= GlobalDebugLevel) \
79 pr_info(DRIVER_PREFIX __VA_ARGS__); \
80 } while (0)
81
82#define MSG_88E(...) \
83 do { \
84 if (_drv_err_ <= GlobalDebugLevel) \
85 pr_info(DRIVER_PREFIX __VA_ARGS__); \
86 } while (0)
87
88#define RT_TRACE(_comp, _level, fmt) \
89 do { \
90 if (_level <= GlobalDebugLevel) { \
91 pr_info("%s [0x%08x,%d]", DRIVER_PREFIX, \
92 (unsigned int)_comp, _level); \
93 pr_info fmt; \
94 } \
95 } while (0)
96
Larry Finger475b922e2013-08-21 22:34:08 -050097#define RT_PRINT_DATA(_comp, _level, _titlestring, _hexdata, _hexdatalen)\
98 do { \
99 if (_level <= GlobalDebugLevel) { \
100 int __i; \
101 u8 *ptr = (u8 *)_hexdata; \
102 pr_info("%s", DRIVER_PREFIX); \
103 pr_info(_titlestring); \
Jia He7be921a22014-11-04 09:39:58 +0800104 for (__i = 0; __i < (int)_hexdatalen; __i++) { \
Larry Finger475b922e2013-08-21 22:34:08 -0500105 pr_info("%02X%s", ptr[__i], \
106 (((__i + 1) % 4) == 0) ? \
107 " " : " "); \
108 if (((__i + 1) % 16) == 0) \
109 printk("\n"); \
110 } \
111 printk("\n"); \
112 } \
113 } while (0)
114
115int proc_get_drv_version(char *page, char **start,
116 off_t offset, int count,
117 int *eof, void *data);
118
119int proc_get_write_reg(char *page, char **start,
120 off_t offset, int count,
121 int *eof, void *data);
122
123int proc_set_write_reg(struct file *file, const char __user *buffer,
124 unsigned long count, void *data);
125int proc_get_read_reg(char *page, char **start,
126 off_t offset, int count,
127 int *eof, void *data);
128
129int proc_set_read_reg(struct file *file, const char __user *buffer,
130 unsigned long count, void *data);
131
132int proc_get_fwstate(char *page, char **start,
133 off_t offset, int count,
134 int *eof, void *data);
135int proc_get_sec_info(char *page, char **start,
136 off_t offset, int count,
137 int *eof, void *data);
138int proc_get_mlmext_state(char *page, char **start,
139 off_t offset, int count,
140 int *eof, void *data);
141
142int proc_get_qos_option(char *page, char **start,
143 off_t offset, int count,
144 int *eof, void *data);
145int proc_get_ht_option(char *page, char **start,
146 off_t offset, int count,
147 int *eof, void *data);
148int proc_get_rf_info(char *page, char **start,
149 off_t offset, int count,
150 int *eof, void *data);
151int proc_get_ap_info(char *page, char **start,
152 off_t offset, int count,
153 int *eof, void *data);
154
155int proc_get_adapter_state(char *page, char **start,
156 off_t offset, int count,
157 int *eof, void *data);
158
159int proc_get_trx_info(char *page, char **start,
160 off_t offset, int count,
161 int *eof, void *data);
162
163int proc_get_mac_reg_dump1(char *page, char **start,
164 off_t offset, int count,
165 int *eof, void *data);
166
167int proc_get_mac_reg_dump2(char *page, char **start,
168 off_t offset, int count,
169 int *eof, void *data);
170
171int proc_get_mac_reg_dump3(char *page, char **start,
172 off_t offset, int count,
173 int *eof, void *data);
174
175int proc_get_bb_reg_dump1(char *page, char **start,
176 off_t offset, int count,
177 int *eof, void *data);
178
179int proc_get_bb_reg_dump2(char *page, char **start,
180 off_t offset, int count,
181 int *eof, void *data);
182
183int proc_get_bb_reg_dump3(char *page, char **start,
184 off_t offset, int count,
185 int *eof, void *data);
186
187int proc_get_rf_reg_dump1(char *page, char **start,
188 off_t offset, int count,
189 int *eof, void *data);
190
191int proc_get_rf_reg_dump2(char *page, char **start,
192 off_t offset, int count,
193 int *eof, void *data);
194
195int proc_get_rf_reg_dump3(char *page, char **start,
196 off_t offset, int count,
197 int *eof, void *data);
198
199int proc_get_rf_reg_dump4(char *page, char **start,
200 off_t offset, int count,
201 int *eof, void *data);
202
203#ifdef CONFIG_88EU_AP_MODE
204
205int proc_get_all_sta_info(char *page, char **start,
206 off_t offset, int count,
207 int *eof, void *data);
208
209#endif
210
211int proc_get_best_channel(char *page, char **start,
212 off_t offset, int count,
213 int *eof, void *data);
214
215int proc_get_rx_signal(char *page, char **start,
216 off_t offset, int count,
217 int *eof, void *data);
218
219int proc_set_rx_signal(struct file *file, const char __user *buffer,
220 unsigned long count, void *data);
221
222int proc_get_ht_enable(char *page, char **start,
223 off_t offset, int count,
224 int *eof, void *data);
225
226int proc_set_ht_enable(struct file *file, const char __user *buffer,
227 unsigned long count, void *data);
228
229int proc_get_cbw40_enable(char *page, char **start,
230 off_t offset, int count,
231 int *eof, void *data);
232
233int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
234 unsigned long count, void *data);
235
236int proc_get_ampdu_enable(char *page, char **start,
237 off_t offset, int count,
238 int *eof, void *data);
239
240int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
241 unsigned long count, void *data);
242
243int proc_get_rx_stbc(char *page, char **start,
244 off_t offset, int count,
245 int *eof, void *data);
246
247int proc_set_rx_stbc(struct file *file, const char __user *buffer,
248 unsigned long count, void *data);
249
250int proc_get_two_path_rssi(char *page, char **start,
251 off_t offset, int count,
252 int *eof, void *data);
253
254int proc_get_rssi_disp(char *page, char **start,
255 off_t offset, int count,
256 int *eof, void *data);
257
258int proc_set_rssi_disp(struct file *file, const char __user *buffer,
259 unsigned long count, void *data);
260
Larry Finger475b922e2013-08-21 22:34:08 -0500261#endif /* __RTW_DEBUG_H__ */