xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723cs/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 "8723CS"
21 #define DRV_NAME "rtl8723cs"
22 
23 #ifndef CONFIG_RTL8703B
24 #define CONFIG_RTL8703B
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 this flag only when we confirm that TDLS CH SW is supported in FW */
84 #endif
85 
86 /* #define CONFIG_CONCURRENT_MODE */	/* Set from Makefile */
87 #ifdef CONFIG_CONCURRENT_MODE
88 	#define CONFIG_RUNTIME_PORT_SWITCH
89 	/* #define DBG_RUNTIME_PORT_SWITCH */
90 
91 
92 	#ifndef CONFIG_RUNTIME_PORT_SWITCH
93 		#define CONFIG_TSF_RESET_OFFLOAD			/* For 2 PORT TSF SYNC. */
94 	#endif
95 	/* #define DBG_RUNTIME_PORT_SWITCH */
96 #endif /* CONFIG_CONCURRENT_MODE */
97 
98 /*
99  * Hareware/Firmware Related Config
100  */
101 /* #define CONFIG_BT_COEXIST */	/* Set from Makefile */
102 /* #define CONFIG_ANTENNA_DIVERSITY */
103 /* #define SUPPORT_HW_RFOFF_DETECTED */
104 
105 /*#define CONFIG_RTW_LED*/
106 #ifdef CONFIG_RTW_LED
107 	/*#define CONFIG_RTW_SW_LED*/
108 #endif /* CONFIG_RTW_LED */
109 
110 #define CONFIG_XMIT_ACK
111 #ifdef CONFIG_XMIT_ACK
112 	#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
113 #endif
114 
115 #define CONFIG_RF_POWER_TRIM
116 
117 #define DISABLE_BB_RF	0
118 
119 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
120 
121 
122 /*
123  * Interface Related Config
124  */
125 #define CONFIG_TX_AGGREGATION
126 #define CONFIG_SDIO_RX_COPY
127 #define CONFIG_XMIT_THREAD_MODE
128 /* #define CONFIG_SDIO_TX_ENABLE_AVAL_INT */
129 #define CONFIG_RECV_THREAD_MODE
130 
131 /*
132  * Others
133  */
134 /* #define CONFIG_MAC_LOOPBACK_DRIVER */
135 
136 #define CONFIG_SKB_COPY	/* for amsdu */
137 
138 #define CONFIG_NEW_SIGNAL_STAT_PROCESS
139 
140 #define CONFIG_EMBEDDED_FWIMG
141 
142 #ifdef CONFIG_EMBEDDED_FWIMG
143 	#define	LOAD_FW_HEADER_FROM_DRIVER
144 #endif
145 /* #define CONFIG_FILE_FWIMG */
146 
147 #define CONFIG_LONG_DELAY_ISSUE
148 /* #define CONFIG_PATCH_JOIN_WRONG_CHANNEL */
149 
150 
151 /*
152  * Auto Config Section
153  */
154 #ifdef CONFIG_MAC_LOOPBACK_DRIVER
155 #undef CONFIG_IOCTL_CFG80211
156 #undef CONFIG_AP_MODE
157 #undef CONFIG_NATIVEAP_MLME
158 #undef CONFIG_POWER_SAVING
159 #undef CONFIG_BT_COEXIST
160 #undef CONFIG_ANTENNA_DIVERSITY
161 #undef SUPPORT_HW_RFOFF_DETECTED
162 #endif
163 
164 #ifdef CONFIG_MP_INCLUDED
165 	#define MP_DRIVER	1
166 	#define CONFIG_MP_IWPRIV_SUPPORT
167 	/* disable unnecessary functions for MP */
168 	/* #undef CONFIG_POWER_SAVING
169 	#undef CONFIG_BT_COEXIST
170 	#undef CONFIG_ANTENNA_DIVERSITY
171 	#undef SUPPORT_HW_RFOFF_DETECTED */
172 #else /* !CONFIG_MP_INCLUDED */
173 	#define MP_DRIVER	0
174 	#undef CONFIG_MP_IWPRIV_SUPPORT
175 #endif /* !CONFIG_MP_INCLUDED */
176 
177 #ifdef CONFIG_POWER_SAVING
178 	#define CONFIG_IPS
179 	#define CONFIG_LPS
180 
181 	#if defined(CONFIG_LPS) && (defined(CONFIG_GSPI_HCI) || defined(CONFIG_SDIO_HCI))
182 	#define CONFIG_LPS_LCLK
183 	#endif
184 
185 	#ifdef CONFIG_LPS
186 		#define CONFIG_CHECK_LEAVE_LPS
187 		#ifndef CONFIG_PLATFORM_INTEL_BYT
188 		#define CONFIG_LPS_SLOW_TRANSITION
189 		#endif /* !CONFIG_PLATFORM_INTEL_BYT */
190 	#endif
191 
192 	#ifdef CONFIG_LPS_LCLK
193 	#define CONFIG_DETECT_CPWM_BY_POLLING
194 	#define CONFIG_LPS_RPWM_TIMER
195 	#if defined(CONFIG_LPS_RPWM_TIMER) || defined(CONFIG_DETECT_CPWM_BY_POLLING)
196 	#define LPS_RPWM_WAIT_MS 300
197 	#endif
198 	#define CONFIG_LPS_LCLK_WD_TIMER /* Watch Dog timer in LPS LCLK */
199 	#endif
200 
201 	#ifdef CONFIG_IPS
202 	#define CONFIG_IPS_CHECK_IN_WD /* Do IPS Check in WatchDog. */
203 	/* #define CONFIG_SWLPS_IN_IPS */ /* Do SW LPS flow when entering and leaving IPS */
204 	/* #define CONFIG_FWLPS_IN_IPS */ /* issue H2C command to let FW do LPS when entering IPS */
205 	#endif
206 #endif /* CONFIG_POWER_SAVING */
207 
208 #ifdef CONFIG_BT_COEXIST
209 	/* for ODM and outsrc BT-Coex */
210 	#ifndef CONFIG_LPS
211 		#define CONFIG_LPS	/* download reserved page to FW */
212 	#endif
213 #endif /* !CONFIG_BT_COEXIST */
214 
215 #ifdef CONFIG_WOWLAN
216 	/* #define CONFIG_GTK_OL */
217 	/* #define CONFIG_ARP_KEEP_ALIVE */
218 #endif /* CONFIG_WOWLAN */
219 
220 #ifdef CONFIG_GPIO_WAKEUP
221 	#ifndef WAKEUP_GPIO_IDX
222 		#define WAKEUP_GPIO_IDX	8	/* WIFI Chip Side */
223 	#endif /* !WAKEUP_GPIO_IDX */
224 #endif /* CONFIG_GPIO_WAKEUP */
225 
226 
227 
228 #ifdef CONFIG_ANTENNA_DIVERSITY
229 #define CONFIG_HW_ANTENNA_DIVERSITY
230 #endif
231 
232 #ifdef CONFIG_RTW_NAPI
233 /*#define CONFIG_RTW_NAPI_DYNAMIC*/
234 #define CONFIG_RTW_NAPI_V2
235 #endif
236 
237 /*
238  * Platform dependent
239  */
240 #ifdef CONFIG_PLATFORM_SPRD
241 
242 #undef CONFIG_SDIO_RX_COPY
243 
244 #ifdef ANDROID_2X
245 
246 #define CONFIG_SDIO_RX_COPY
247 
248 #else /*  !ANDROID_2X */
249 	#undef CONFIG_WOWLAN
250 	#undef CONFIG_WOWLAN_8723
251 	/* #define CONFIG_SDIO_RX_COPY */
252 	/* #define CONFIG_LINKED_LCOK */
253 	#define CONFIG_AUTH_DIRECT_WITHOUT_BCN
254 	/* #define CONFIG_DISCONNECT_H2CWAY */
255 	/* #define CONFIG_DONT_CARE_TP */
256 	#define CONFIG_LOW_PWR_LPS
257 	/* #define CONFIG_CMCC_TEST */
258 
259 	/* 1) LPS unit is only 102 ms, it's not
260 	a good idear to retry it use timer,
261 	2) we must wait ACK, or lots of IO
262 	is not allowed under 32k, because
263 	this will cause hw hang */
264 	#undef CONFIG_LPS_RPWM_TIMER
265 	#define CONFIG_WAIT_PS_ACK
266 	#define CONFIG_SOFTAP_11N
267 	#define CONFIG_CHECK_BT_HANG
268 
269 	/* #define CONFIG_8703BS_TEST */
270 #endif /* !ANDROID_2X */
271 
272 #endif /* CONFIG_PLATFORM_SPRD */
273 
274 
275 /*
276  * Debug Related Config
277  */
278 #ifdef CONFIG_RTW_DEBUG
279 #define DBG	1	/* for ODM & BTCOEX debug */
280 #else /* !CONFIG_RTW_DEBUG */
281 #define DBG	0	/* for ODM & BTCOEX debug */
282 #endif /* !CONFIG_RTW_DEBUG */
283 
284 #define DBG_CONFIG_ERROR_DETECT
285 /* #define DBG_XMIT_BUF */
286 /* #define DBG_XMIT_BUF_EXT */
287 #define DBG_CHECK_FW_PS_STATE
288 #define DBG_CHECK_FW_PS_STATE_H2C
289 /* #define CONFIG_FW_C2H_DEBUG */
290 #define	DBG_RX_DFRAME_RAW_DATA
291