8723BU: Update 8723BU wifi driver to version v4.3.16_14189.20150519_BTCOEX2015119...
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bu / include / autoconf.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2014 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 /*
21  * Public General Config
22  */
23 #define AUTOCONF_INCLUDED
24
25 #define RTL871X_MODULE_NAME "8723BU"
26 #define DRV_NAME "rtl8723bu"
27
28 #ifndef CONFIG_RTL8723B
29 #define CONFIG_RTL8723B
30 #endif
31 #define CONFIG_USB_HCI
32
33 #define PLATFORM_LINUX
34
35
36 /*
37  * Wi-Fi Functions Config
38  */
39 #define CONFIG_80211N_HT
40 #define CONFIG_RECV_REORDERING_CTRL
41
42 //#define CONFIG_IOCTL_CFG80211         // Set from Makefile
43 #ifdef CONFIG_IOCTL_CFG80211
44         /*
45          * Indecate new sta asoc through cfg80211_new_sta
46          * If kernel version >= 3.2 or
47          * version < 3.2 but already apply cfg80211 patch,
48          * RTW_USE_CFG80211_STA_EVENT must be defiend!
49          */
50         //#define RTW_USE_CFG80211_STA_EVENT /* Indecate new sta asoc through cfg80211_new_sta */
51         #define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
52         //#define CONFIG_DEBUG_CFG80211
53         //#define CONFIG_DRV_ISSUE_PROV_REQ // IOT FOR S2
54         #define CONFIG_SET_SCAN_DENY_TIMER
55 #endif
56
57 #define CONFIG_AP_MODE
58 #ifdef CONFIG_AP_MODE
59         #define CONFIG_NATIVEAP_MLME
60         #ifndef CONFIG_NATIVEAP_MLME
61                 #define CONFIG_HOSTAPD_MLME
62         #endif
63         //#define CONFIG_FIND_BEST_CHANNEL
64         #define CONFIG_TX_MCAST2UNI     // Support IP multicast->unicast
65
66         //#define CONFIG_AUTO_AP_MODE
67 #endif
68
69 #define CONFIG_P2P
70 #ifdef CONFIG_P2P
71         //Added by Albert 20110812
72         //The CONFIG_WFD is for supporting the Wi-Fi display
73         #define CONFIG_WFD
74
75         #define CONFIG_P2P_REMOVE_GROUP_INFO
76
77         //#define CONFIG_DBG_P2P
78         #define CONFIG_P2P_PS
79         //#define CONFIG_P2P_IPS
80         #define CONFIG_P2P_OP_CHK_SOCIAL_CH
81         #define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT  //replace CONFIG_P2P_CHK_INVITE_CH_LIST flag
82         #define CONFIG_P2P_INVITE_IOT
83 #endif
84
85 // Added by Kurt 20110511
86 #ifdef CONFIG_TDLS
87         #define CONFIG_TDLS_DRIVER_SETUP
88 //      #ifndef CONFIG_WFD
89 //              #define CONFIG_WFD
90 //      #endif
91 //      #define CONFIG_TDLS_AUTOSETUP
92         #define CONFIG_TDLS_AUTOCHECKALIVE
93         #define CONFIG_TDLS_CH_SW               /* Enable "CONFIG_TDLS_CH_SW" by default, however limit it to only work in wifi logo test mode but not in normal mode currently */
94 #endif
95
96 //#define CONFIG_CONCURRENT_MODE        // Set from Makefile
97 #ifdef CONFIG_CONCURRENT_MODE
98         #define CONFIG_TSF_RESET_OFFLOAD                        // For 2 PORT TSF SYNC.
99         //#define CONFIG_HWPORT_SWAP                            // Port0->Sec , Port1 -> Pri
100         #define CONFIG_RUNTIME_PORT_SWITCH
101         //#define DBG_RUNTIME_PORT_SWITCH
102         #define CONFIG_STA_MODE_SCAN_UNDER_AP_MODE
103
104         //#define CONFIG_MULTI_VIR_IFACES //besides primary&secondary interfaces, extend to support more interfaces
105 #endif // CONFIG_CONCURRENT_MODE
106
107 #define CONFIG_LAYER2_ROAMING
108 #define CONFIG_LAYER2_ROAMING_RESUME
109
110 #define CONFIG_80211D
111
112
113 /*
114  * Hareware/Firmware Related Config
115  */
116 //#define CONFIG_ANTENNA_DIVERSITY      // Set from Makefile
117 //#define SUPPORT_HW_RFOFF_DETECTED
118
119 #define CONFIG_LED
120 #ifdef CONFIG_LED
121         #define CONFIG_SW_LED
122         #ifdef CONFIG_SW_LED
123                 //#define CONFIG_LED_HANDLED_BY_CMD_THREAD
124         #endif
125 #endif // CONFIG_LED
126
127 #define CONFIG_XMIT_ACK
128 #ifdef CONFIG_XMIT_ACK
129         #define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
130 #endif
131
132 #define CONFIG_C2H_PACKET_EN
133
134 #define CONFIG_RF_GAIN_OFFSET
135
136 #define DISABLE_BB_RF   0
137
138 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
139
140 /*
141  * Interface Related Config
142  */
143 #define CONFIG_USB_TX_AGGREGATION
144 #define CONFIG_USB_RX_AGGREGATION
145
146 #define USB_INTERFERENCE_ISSUE // this should be checked in all usb interface
147
148 #define CONFIG_GLOBAL_UI_PID
149
150 #define CONFIG_OUT_EP_WIFI_MODE
151
152 #define ENABLE_USB_DROP_INCORRECT_OUT
153
154 //#define CONFIG_SUPPORT_USB_INT
155 #ifdef CONFIG_SUPPORT_USB_INT
156 //#define CONFIG_USB_INTERRUPT_IN_PIPE
157 #endif
158
159 //#define CONFIG_REDUCE_USB_TX_INT      // Trade-off: Improve performance, but may cause TX URBs blocked by USB Host/Bus driver on few platforms.
160
161 /*
162  * CONFIG_USE_USB_BUFFER_ALLOC_XX uses Linux USB Buffer alloc API and is for Linux platform only now!
163  */
164 //#define CONFIG_USE_USB_BUFFER_ALLOC_TX        // Trade-off: For TX path, improve stability on some platforms, but may cause performance degrade on other platforms.
165 //#define CONFIG_USE_USB_BUFFER_ALLOC_RX        // For RX path
166
167 /*
168  * USB VENDOR REQ BUFFER ALLOCATION METHOD
169  * if not set we'll use function local variable (stack memory)
170  */
171 //#define CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE
172 #define CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
173 #define CONFIG_USB_VENDOR_REQ_MUTEX
174 #define CONFIG_VENDOR_REQ_RETRY
175 //#define CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
176
177
178 /*
179  * Others
180  */
181 #define CONFIG_SKB_COPY //for amsdu
182
183 //#define CONFIG_EASY_REPLACEMENT
184
185 //#define CONFIG_ADAPTOR_INFO_CACHING_FILE // now just applied on 8192cu only, should make it general...
186
187 //#define CONFIG_RESUME_IN_WORKQUEUE
188
189 //#define CONFIG_SET_SCAN_DENY_TIMER
190
191 #define CONFIG_NEW_SIGNAL_STAT_PROCESS
192
193 //#define CONFIG_SIGNAL_DISPLAY_DBM //display RX signal with dbm
194 #ifdef CONFIG_SIGNAL_DISPLAY_DBM
195 //#define CONFIG_BACKGROUND_NOISE_MONITOR
196 #endif
197
198 //#define CONFIG_CHECK_AC_LIFETIME      // Check packet lifetime of 4 ACs.
199
200 #define CONFIG_EMBEDDED_FWIMG
201 //#define CONFIG_FILE_FWIMG
202
203 #define CONFIG_LONG_DELAY_ISSUE
204 #define CONFIG_ATTEMPT_TO_FIX_AP_BEACON_ERROR
205
206
207 /*
208  * Auto Config Section
209  */
210 #ifdef CONFIG_MINIMAL_MEMORY_USAGE
211         #undef CONFIG_USB_TX_AGGREGATION
212         #undef CONFIG_USB_RX_AGGREGATION
213 #endif
214
215 #ifdef CONFIG_MP_INCLUDED
216         #define MP_DRIVER       1
217         #define CONFIG_MP_IWPRIV_SUPPORT
218         //#undef CONFIG_USB_TX_AGGREGATION
219         //#undef CONFIG_USB_RX_AGGREGATION
220 #else // !CONFIG_MP_INCLUDED
221         #define MP_DRIVER       0
222 #endif // !CONFIG_MP_INCLUDED
223
224 #ifdef CONFIG_POWER_SAVING
225         #define CONFIG_IPS
226         #define CONFIG_LPS
227
228         #ifdef CONFIG_IPS
229         //#define CONFIG_IPS_LEVEL_2    1 //enable this to set default IPS mode to IPS_LEVEL_2
230         #endif
231
232         #if defined(CONFIG_LPS) && defined(CONFIG_SUPPORT_USB_INT)
233                 //#define CONFIG_LPS_LCLK
234         #endif
235
236         #ifdef CONFIG_LPS_LCLK
237                 #define CONFIG_XMIT_THREAD_MODE
238         #endif
239 #endif // CONFIG_POWER_SAVING
240
241 #ifdef CONFIG_BT_COEXIST
242         // for ODM and outsrc BT-Coex
243         #define BT_30_SUPPORT 1
244
245         #ifndef CONFIG_LPS
246                 #define CONFIG_LPS      // download reserved page to FW
247         #endif
248
249         #ifndef CONFIG_C2H_PACKET_EN
250                 #define CONFIG_C2H_PACKET_EN
251         #endif
252 #else // !CONFIG_BT_COEXIST
253         #define BT_30_SUPPORT 0
254 #endif // !CONFIG_BT_COEXIST
255
256 #ifdef CONFIG_WOWLAN
257         //#define CONFIG_GTK_OL
258 #endif // CONFIG_WOWLAN
259
260 #ifdef CONFIG_GPIO_WAKEUP
261         #ifndef WAKEUP_GPIO_IDX
262                 #define WAKEUP_GPIO_IDX 14      // WIFI Chip Side
263         #endif // !WAKEUP_GPIO_IDX
264 #endif // CONFIG_GPIO_WAKEUP
265
266 #ifdef CONFIG_AP_MODE
267         //#define CONFIG_INTERRUPT_BASED_TXBCN // Tx Beacon when driver BCN_OK ,BCN_ERR interrupt occurs
268         #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN)
269                 #undef CONFIG_INTERRUPT_BASED_TXBCN
270         #endif
271         #ifdef CONFIG_INTERRUPT_BASED_TXBCN
272                 //#define CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
273                 #define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
274         #endif
275 #endif // CONFIG_AP_MODE
276
277 #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
278
279 #else
280         #define CONFIG_PREALLOC_RECV_SKB
281         #ifdef CONFIG_PREALLOC_RECV_SKB
282                 //#define CONFIG_FIX_NR_BULKIN_BUFFER /* only use PREALLOC_RECV_SKB buffer, don't alloc skb at runtime */
283         #endif
284 #endif
285
286 #ifdef CONFIG_USB_TX_AGGREGATION
287 //#define CONFIG_TX_EARLY_MODE
288 #endif
289
290 #ifdef CONFIG_TX_EARLY_MODE
291 #define RTL8723B_EARLY_MODE_PKT_NUM_10  0
292 #endif
293
294
295 /*
296  * Outsource  Related Config
297  */
298
299 #define TESTCHIP_SUPPORT                                0
300  
301 #define RTL8188E_SUPPORT                                0
302 #define RTL8812A_SUPPORT                                0
303 #define RTL8821A_SUPPORT                                0
304 #define RTL8723B_SUPPORT                                1
305 #define RTL8192E_SUPPORT                                0
306 #define RTL8814A_SUPPORT                                0
307 #define         RTL8195A_SUPPORT                                0
308
309 #define RATE_ADAPTIVE_SUPPORT                   0
310 #define POWER_TRAINING_ACTIVE                   0
311
312 #ifdef CONFIG_ANTENNA_DIVERSITY
313 #define CONFIG_HW_ANTENNA_DIVERSITY
314 #endif
315
316
317 /*
318  * Debug Related Config
319  */
320 //#define CONFIG_DEBUG /* DBG_871X, etc... */
321
322 #ifdef CONFIG_DEBUG
323 #define DBG     1       // for ODM & BTCOEX debug
324 //#define CONFIG_DEBUG_RTL871X /* RT_TRACE, RT_PRINT_DATA, _func_enter_, _func_exit_ */
325 #else // !CONFIG_DEBUG
326 #define DBG     0       // for ODM & BTCOEX debug
327 #endif // !CONFIG_DEBUG
328
329 #define CONFIG_PROC_DEBUG
330
331 //#define DBG_CONFIG_ERROR_DETECT
332 //#define DBG_CONFIG_ERROR_DETECT_INT
333 //#define DBG_CONFIG_ERROR_RESET
334
335 //#define DBG_IO
336 //#define DBG_DELAY_OS
337 //#define DBG_MEM_ALLOC
338 //#define DBG_IOCTL
339
340 //#define DBG_TX
341 //#define DBG_XMIT_BUF
342 //#define DBG_XMIT_BUF_EXT
343 //#define DBG_TX_DROP_FRAME
344
345 //#define DBG_RX_DROP_FRAME
346 //#define DBG_RX_SEQ
347 //#define DBG_RX_SIGNAL_DISPLAY_PROCESSING
348 //#define DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED "rtw-ap"
349
350
351 //#define DBG_SHOW_MCUFWDL_BEFORE_51_ENABLE
352 //#define DBG_ROAMING_TEST
353
354 //#define DBG_HAL_INIT_PROFILING
355
356 //#define DBG_MEMORY_LEAK       1
357