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