xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8723ds/include/autoconf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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 /*
16  * Public General Config
17  */
18 #define AUTOCONF_INCLUDED
19 
20 #define RTL871X_MODULE_NAME "8723DS"
21 #define DRV_NAME "rtl8723ds"
22 
23 #ifndef CONFIG_RTL8723D
24 #define CONFIG_RTL8723D
25 #endif
26 #define CONFIG_SDIO_HCI
27 
28 #define PLATFORM_LINUX
29 
30 
31 /*
32  * Wi-Fi Functions Config
33  */
34 #define CONFIG_80211N_HT
35 #define CONFIG_RECV_REORDERING_CTRL
36 
37 /* #define CONFIG_IOCTL_CFG80211 */		/* Set from Makefile */
38 #ifdef CONFIG_IOCTL_CFG80211
39 	/*
40 	 * Indecate new sta asoc through cfg80211_new_sta
41 	 * If kernel version >= 3.2 or
42 	 * version < 3.2 but already apply cfg80211 patch,
43 	 * RTW_USE_CFG80211_STA_EVENT must be defiend!
44 	 */
45 	/* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */
46 	#ifndef CONFIG_PLATFORM_INTEL_BYT
47 	#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
48 	#endif /* !CONFIG_PLATFORM_INTEL_BYT */
49 	/* #define CONFIG_DEBUG_CFG80211 */
50 	#define CONFIG_SET_SCAN_DENY_TIMER
51 #endif
52 
53 #ifdef CONFIG_AP_MODE
54 	#define CONFIG_NATIVEAP_MLME
55 	#ifndef CONFIG_NATIVEAP_MLME
56 		#define CONFIG_HOSTAPD_MLME
57 	#endif
58 	/* #define CONFIG_FIND_BEST_CHANNEL */
59 #endif
60 
61 #ifdef CONFIG_P2P
62 	/* Added by Albert 20110812
63 	The CONFIG_WFD is for supporting the Wi-Fi display */
64 	#define CONFIG_WFD
65 
66 	#define CONFIG_P2P_REMOVE_GROUP_INFO
67 
68 	/* #define CONFIG_DBG_P2P */
69 	#define CONFIG_P2P_PS
70 	#define CONFIG_P2P_OP_CHK_SOCIAL_CH
71 	#define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT  /* replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */
72 	/*#define CONFIG_P2P_INVITE_IOT*/
73 #endif
74 
75 /* Added by Kurt 20110511 */
76 #ifdef CONFIG_TDLS
77 	#define CONFIG_TDLS_DRIVER_SETUP
78 	/* #ifndef CONFIG_WFD
79 		#define CONFIG_WFD
80 	#endif */
81 	/* #define CONFIG_TDLS_AUTOSETUP */
82 	#define CONFIG_TDLS_AUTOCHECKALIVE
83 	#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 */
84 #endif
85 
86 /* #define CONFIG_CONCURRENT_MODE */	/* Set from Makefile */
87 #ifdef CONFIG_CONCURRENT_MODE
88 	#define CONFIG_RUNTIME_PORT_SWITCH
89 	#ifndef CONFIG_RUNTIME_PORT_SWITCH
90 		#define CONFIG_TSF_RESET_OFFLOAD			/* For 2 PORT TSF SYNC. */
91 	#endif
92 	/* #define DBG_RUNTIME_PORT_SWITCH */
93 #endif /* CONFIG_CONCURRENT_MODE */
94 
95 /*
96  * Hareware/Firmware Related Config
97  */
98 /* #define CONFIG_BT_COEXIST */	/* Set from Makefile */
99 /* #define CONFIG_ANTENNA_DIVERSITY */
100 /* #define SUPPORT_HW_RFOFF_DETECTED */
101 
102 /*#define CONFIG_RTW_LED*/
103 #ifdef CONFIG_RTW_LED
104 	/*#define CONFIG_RTW_SW_LED*/
105 #endif /* CONFIG_RTW_LED */
106 
107 #define CONFIG_XMIT_ACK
108 #ifdef CONFIG_XMIT_ACK
109 	#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
110 #endif
111 
112 #define CONFIG_RF_POWER_TRIM
113 
114 #define DISABLE_BB_RF	0
115 
116 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
117 
118 
119 /*
120  * Interface Related Config
121  */
122 #define CONFIG_TX_AGGREGATION
123 #define CONFIG_SDIO_RX_COPY
124 #define CONFIG_XMIT_THREAD_MODE
125 /* #define RTW_XMIT_THREAD_HIGH_PRIORITY */
126 /* #define RTW_XMIT_THREAD_HIGH_PRIORITY_AGG */
127 /* #define CONFIG_SDIO_TX_ENABLE_AVAL_INT */
128 /* #define SDIO_FREE_XMIT_BUF_SEMA */
129 #define CONFIG_RECV_THREAD_MODE
130 #ifdef CONFIG_RECV_THREAD_MODE
131 #define RTW_RECV_THREAD_HIGH_PRIORITY
132 #endif/*CONFIG_RECV_THREAD_MODE*/
133 
134 /*
135  * Others
136  */
137 /* #define CONFIG_MAC_LOOPBACK_DRIVER */
138 
139 #define CONFIG_SKB_COPY	/* for amsdu */
140 
141 #define CONFIG_NEW_SIGNAL_STAT_PROCESS
142 
143 #define CONFIG_EMBEDDED_FWIMG
144 
145 #ifdef CONFIG_EMBEDDED_FWIMG
146 	#define	LOAD_FW_HEADER_FROM_DRIVER
147 #endif
148 /* #define CONFIG_FILE_FWIMG */
149 /* download fw via tx packet or trafitional I/O*/
150 /* #define CONFIG_DLFW_TXPKT */
151 
152 #define CONFIG_LONG_DELAY_ISSUE
153 /* #define CONFIG_PATCH_JOIN_WRONG_CHANNEL */
154 
155 #define CONFIG_RX_PACKET_APPEND_FCS
156 
157 
158 /*
159  * Auto Config Section
160  */
161 #ifdef CONFIG_MAC_LOOPBACK_DRIVER
162 #undef CONFIG_IOCTL_CFG80211
163 #undef CONFIG_AP_MODE
164 #undef CONFIG_NATIVEAP_MLME
165 #undef CONFIG_POWER_SAVING
166 #undef CONFIG_BT_COEXIST
167 #undef CONFIG_ANTENNA_DIVERSITY
168 #undef SUPPORT_HW_RFOFF_DETECTED
169 #endif
170 
171 #ifdef CONFIG_MP_INCLUDED
172 	#define MP_DRIVER	1
173 	#define CONFIG_MP_IWPRIV_SUPPORT
174 	/* disable unnecessary functions for MP */
175 	/* #undef CONFIG_POWER_SAVING
176 	#undef CONFIG_BT_COEXIST
177 	#undef CONFIG_ANTENNA_DIVERSITY
178 	#undef SUPPORT_HW_RFOFF_DETECTED */
179 #else /* !CONFIG_MP_INCLUDED */
180 	#define MP_DRIVER	0
181 	#undef CONFIG_MP_IWPRIV_SUPPORT
182 #endif /* !CONFIG_MP_INCLUDED */
183 
184 #ifdef CONFIG_POWER_SAVING
185 	#define CONFIG_IPS
186 	#define CONFIG_LPS
187 
188 	#if defined(CONFIG_LPS) && (defined(CONFIG_GSPI_HCI) || defined(CONFIG_SDIO_HCI))
189 	#define CONFIG_LPS_LCLK
190 	#endif
191 
192 	#ifdef CONFIG_LPS
193 		#define CONFIG_CHECK_LEAVE_LPS
194 		#ifndef CONFIG_PLATFORM_INTEL_BYT
195 		#define CONFIG_LPS_SLOW_TRANSITION
196 		#endif /* !CONFIG_PLATFORM_INTEL_BYT */
197 	#endif
198 
199 	#ifdef CONFIG_LPS_LCLK
200 	#define CONFIG_DETECT_CPWM_BY_POLLING
201 	#define CONFIG_LPS_RPWM_TIMER
202 	#if defined(CONFIG_LPS_RPWM_TIMER) || defined(CONFIG_DETECT_CPWM_BY_POLLING)
203 	#define LPS_RPWM_WAIT_MS 300
204 	#endif
205 	#define CONFIG_LPS_LCLK_WD_TIMER /* Watch Dog timer in LPS LCLK */
206 	#endif
207 
208 	#ifdef CONFIG_IPS
209 	#define CONFIG_IPS_CHECK_IN_WD /* Do IPS Check in WatchDog. */
210 	/* #define CONFIG_SWLPS_IN_IPS */ /* Do SW LPS flow when entering and leaving IPS */
211 	/* #define CONFIG_FWLPS_IN_IPS */ /* issue H2C command to let FW do LPS when entering IPS */
212 	#endif
213 #endif /* CONFIG_POWER_SAVING */
214 
215 #ifdef CONFIG_BT_COEXIST
216 	/* for ODM and outsrc BT-Coex */
217 	#ifndef CONFIG_LPS
218 		#define CONFIG_LPS	/* download reserved page to FW */
219 	#endif
220 #endif /* !CONFIG_BT_COEXIST */
221 
222 #ifdef CONFIG_WOWLAN
223 	#define CONFIG_GTK_OL
224 	/* #define CONFIG_ARP_KEEP_ALIVE */
225 #endif /* CONFIG_WOWLAN */
226 
227 #ifdef CONFIG_GPIO_WAKEUP
228 	#ifndef WAKEUP_GPIO_IDX
229 		#define WAKEUP_GPIO_IDX	6	/* WIFI Chip Side */
230 	#endif /* !WAKEUP_GPIO_IDX */
231 #endif /* CONFIG_GPIO_WAKEUP */
232 
233 #ifdef CONFIG_ANTENNA_DIVERSITY
234 #define CONFIG_HW_ANTENNA_DIVERSITY
235 #endif
236 
237 #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0xf3
238 
239 #ifdef CONFIG_RTW_NAPI
240 /*#define CONFIG_RTW_NAPI_DYNAMIC*/
241 #define CONFIG_RTW_NAPI_V2
242 #endif
243 
244 /*
245  * Platform dependent
246  */
247 #ifdef CONFIG_PLATFORM_SPRD
248 
249 #undef CONFIG_SDIO_RX_COPY
250 
251 #ifdef ANDROID_2X
252 
253 #define CONFIG_SDIO_RX_COPY
254 
255 #else /*  !ANDROID_2X */
256 	#undef CONFIG_WOWLAN
257 	#undef CONFIG_WOWLAN_8723
258 	/* #define CONFIG_SDIO_RX_COPY */
259 	/* #define CONFIG_LINKED_LCOK */
260 	#define CONFIG_AUTH_DIRECT_WITHOUT_BCN
261 	/* #define CONFIG_DISCONNECT_H2CWAY */
262 	/* #define CONFIG_DONT_CARE_TP */
263 	#define CONFIG_LOW_PWR_LPS
264 	/* #define CONFIG_CMCC_TEST */
265 
266 	/* 1) LPS unit is only 102 ms, it's not
267 	a good idear to retry it use timer,
268 	2) we must wait ACK, or lots of IO
269 	is not allowed under 32k, because
270 	this will cause hw hang */
271 	#undef CONFIG_LPS_RPWM_TIMER
272 	#define CONFIG_WAIT_PS_ACK
273 	#define CONFIG_SOFTAP_11N
274 	#define CONFIG_CHECK_BT_HANG
275 
276 	/* #define CONFIG_8703BS_TEST */
277 #endif /* !ANDROID_2X */
278 
279 #endif /* CONFIG_PLATFORM_SPRD */
280 
281 
282 /*
283  * Debug Related Config
284  */
285 #define CONFIG_DEBUG
286 
287 #ifdef CONFIG_DEBUG
288 #define DBG	1	/* for ODM & BTCOEX debug */
289 #else /* !CONFIG_DEBUG */
290 #define DBG	0	/* for ODM & BTCOEX debug */
291 #endif /* !CONFIG_DEBUG */
292 
293 #define DBG_CONFIG_ERROR_DETECT
294 /* #define DBG_XMIT_BUF */
295 /* #define DBG_XMIT_BUF_EXT */
296 #define DBG_CHECK_FW_PS_STATE
297 /* #define DBG_CHECK_FW_PS_STATE_H2C */
298 /* #define CONFIG_FW_C2H_DEBUG */
299