xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/include/autoconf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 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 /* For debug */
16 /*#define CONFIG_DISABLE_ODM*/
17 /*#define CONFIG_NO_FW*/
18 #define CONFIG_IQK_MONITOR
19 #define DBG_C2H_MAC_HIDDEN_RPT_HANDLE	1
20 #define DBG_H2C_CONTENT
21 
22 #ifndef DBG_MEM_ALLOC
23 #define DBG_MEM_ALLOC
24 #endif
25 
26 /*#define DBG_XMIT_BLOCK*/
27 
28 /*#define DBG_RX_COUNTER_DUMP*/
29 #define CONFIG_ERROR_STATE_MONITOR
30 /*#define CONFIG_MONITOR_OVERFLOW*/
31 
32 #define CONFIG_SDIO_INDIRECT_ACCESS
33 #define DBG_SDIO_INDIRECT_ACCESS
34 
35 /*#define CONFIG_SUPPORT_TRX_SHARED*/
36 #ifdef CONFIG_SUPPORT_TRX_SHARED
37 #define DFT_TRX_SHARE_MODE	0	/*default trx share mode,mode could be 0 or 1*/
38 #endif
39 #define CONFIG_IO_CHECK_IN_ANA_LOW_CLK
40 
41 /*
42  * Public General Config
43  */
44 #define AUTOCONF_INCLUDED
45 
46 #define RTL871X_MODULE_NAME "8821CS"
47 #define DRV_NAME "rtl8821cs"
48 
49 /* Set CONFIG_RTL8821C from Makefile */
50 #ifndef CONFIG_RTL8821C
51 #define CONFIG_RTL8821C
52 #endif
53 #define CONFIG_SDIO_HCI
54 #define PLATFORM_LINUX
55 
56 
57 /*
58  * Wi-Fi Functions Config
59  */
60 
61 #define CONFIG_RECV_REORDERING_CTRL
62 
63 #define CONFIG_80211N_HT
64 #define CONFIG_80211AC_VHT
65 #ifdef CONFIG_80211AC_VHT
66 	#ifndef CONFIG_80211N_HT
67 		#define CONFIG_80211N_HT
68 	#endif
69 #endif
70 
71 /* Set CONFIG_IOCTL_CFG80211 from Makefile */
72 #ifdef CONFIG_IOCTL_CFG80211
73 	/*
74 	 * Indecate new sta asoc through cfg80211_new_sta
75 	 * If kernel version >= 3.2 or
76 	 * version < 3.2 but already apply cfg80211 patch,
77 	 * RTW_USE_CFG80211_STA_EVENT must be defiend!
78 	 */
79 	/* Set RTW_USE_CFG80211_STA_EVENT from Makefile */
80 	#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
81 	/* #define CONFIG_DEBUG_CFG80211 */
82 	#define CONFIG_SET_SCAN_DENY_TIMER
83 #endif /* CONFIG_IOCTL_CFG80211 */
84 
85 #ifdef CONFIG_AP_MODE
86 	#define CONFIG_INTERRUPT_BASED_TXBCN /* Tx Beacon when driver receive related interrupt*/
87 	#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN)
88 		#undef CONFIG_INTERRUPT_BASED_TXBCN
89 	#endif
90 	#ifdef CONFIG_INTERRUPT_BASED_TXBCN
91 		#define CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
92 		/* #define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
93 	#endif
94 	#define CONFIG_NATIVEAP_MLME
95 	#ifndef CONFIG_NATIVEAP_MLME
96 		#define CONFIG_HOSTAPD_MLME
97 	#endif
98 	/*#define CONFIG_FIND_BEST_CHANNEL*/
99 #endif
100 
101 #ifdef CONFIG_P2P
102 	#define CONFIG_WFD	/* Wi-Fi display */
103 	#define CONFIG_P2P_REMOVE_GROUP_INFO
104 	/*#define CONFIG_DBG_P2P*/
105 	#define CONFIG_P2P_PS
106 	/*#define CONFIG_P2P_IPS*/
107 	#define CONFIG_P2P_OP_CHK_SOCIAL_CH
108 	#define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT  /* Replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */
109 	/*#define CONFIG_P2P_INVITE_IOT*/
110 #endif /* CONFIG_P2P */
111 
112 /* Set CONFIG_TDLS from Makefile */
113 #ifdef CONFIG_TDLS
114 	#define CONFIG_TDLS_DRIVER_SETUP
115 /*	#ifndef CONFIG_WFD
116 		#define CONFIG_WFD
117 	#endif*/
118 /*	#define CONFIG_TDLS_AUTOSETUP*/
119 	#define CONFIG_TDLS_AUTOCHECKALIVE
120 	/*
121 	 * Enable "CONFIG_TDLS_CH_SW" by default,
122 	 * however limit it to only work in wifi logo test mode
123 	 * but not in normal mode currently
124 	 */
125 	#define CONFIG_TDLS_CH_SW
126 #endif /* CONFIG_TDLS */
127 
128 
129 /*#define CONFIG_RTW_80211K*/
130 
131 /*
132  * Hareware/Firmware Related Config
133  */
134 /* Set CONFIG_BT_COEXIST from Makefile */
135 /* Set CONFIG_ANTENNA_DIVERSITY from Makefile */
136 /*#define SUPPORT_HW_RFOFF_DETECTED*/
137 
138 /*#define CONFIG_RTW_LED*/
139 #ifdef CONFIG_RTW_LED
140 	/*#define CONFIG_RTW_SW_LED*/
141 #endif /* CONFIG_RTW_LED */
142 #define CONFIG_XMIT_ACK
143 #ifdef CONFIG_XMIT_ACK
144 	#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
145 #endif
146 
147 #define DISABLE_BB_RF		0
148 #define RTW_NOTCH_FILTER	0 /* 0:Disable, 1:Enable */
149 
150 
151 /*
152  * Software feature Related Config
153  */
154 #define RTW_HALMAC		/* Use HALMAC architecture, necessary for 8821C */
155 
156 
157 /*
158  * Interface Related Config
159  */
160 #define CONFIG_TX_AGGREGATION
161 #define CONFIG_XMIT_THREAD_MODE	/* necessary for SDIO */
162 /*#define CONFIG_SDIO_TX_ENABLE_AVAL_INT => Related MAC reg must setting => HAL-MAC ?? */
163 #define CONFIG_SDIO_RX_COPY
164 
165 #define CONFIG_RECV_THREAD_MODE
166 #ifdef CONFIG_RECV_THREAD_MODE
167 #define RTW_RECV_THREAD_HIGH_PRIORITY
168 #endif/*CONFIG_RECV_THREAD_MODE*/
169 
170 #ifdef CONFIG_RTW_NAPI
171 #define CONFIG_RTW_NAPI_DYNAMIC
172 #define CONFIG_RTW_NAPI_V2
173 #endif
174 
175 /*#define CONFIG_BEAMFORMING*/
176 
177 #define CONFIG_REDUCE_TX_CPU_LOADING
178 
179 /*
180  * Others
181  */
182 /*#define CONFIG_MAC_LOOPBACK_DRIVER*/
183 #define CONFIG_SKB_COPY		/* for amsdu */
184 #define CONFIG_NEW_SIGNAL_STAT_PROCESS
185 #define CONFIG_EMBEDDED_FWIMG
186 /*#define CONFIG_FILE_FWIMG*/
187 #define CONFIG_LONG_DELAY_ISSUE
188 /*#define CONFIG_PATCH_JOIN_WRONG_CHANNEL*/
189 #define CONFIG_RX_PACKET_APPEND_FCS
190 
191 
192 /*
193  * Platform
194  */
195 #ifdef CONFIG_PLATFORM_INTEL_BYT
196 #ifdef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
197 #undef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
198 #endif
199 #endif /* CONFIG_PLATFORM_INTEL_BYT */
200 
201 
202 /*
203  * Auto Config Section
204  */
205 #ifdef CONFIG_MAC_LOOPBACK_DRIVER
206 #undef CONFIG_IOCTL_CFG80211
207 #undef CONFIG_AP_MODE
208 #undef CONFIG_NATIVEAP_MLME
209 #undef CONFIG_POWER_SAVING
210 #undef CONFIG_BT_COEXIST
211 #undef CONFIG_ANTENNA_DIVERSITY
212 #undef SUPPORT_HW_RFOFF_DETECTED
213 #endif /* CONFIG_MAC_LOOPBACK_DRIVER */
214 
215 #ifdef CONFIG_MP_INCLUDED
216 	#define MP_DRIVER	1
217 	#define CONFIG_MP_IWPRIV_SUPPORT
218 	/* disable unnecessary functions for MP*/
219 	/*#undef CONFIG_POWER_SAVING*/
220 	/*#undef CONFIG_BT_COEXIST*/
221 	/*#undef CONFIG_ANTENNA_DIVERSITY*/
222 	/*#undef SUPPORT_HW_RFOFF_DETECTED*/
223 #else /* !CONFIG_MP_INCLUDED */
224 	#define MP_DRIVER	0
225 	#undef CONFIG_MP_IWPRIV_SUPPORT
226 #endif /* !CONFIG_MP_INCLUDED */
227 
228 #ifdef CONFIG_POWER_SAVING
229 	#define CONFIG_IPS
230 	#define CONFIG_LPS
231 
232 	#if defined(CONFIG_LPS) && (defined(CONFIG_GSPI_HCI) || defined(CONFIG_SDIO_HCI))
233 	#define CONFIG_LPS_LCLK
234 	#endif
235 
236 	#ifdef CONFIG_LPS
237 		#define CONFIG_CHECK_LEAVE_LPS
238 		#define CONFIG_LPS_CHK_BY_TP
239 		#ifdef CONFIG_LPS_CHK_BY_TP
240 			#define LPS_TX_TP_TH		12 /*Mbps*/
241 			#define LPS_RX_TP_TH	12 /*Mbps*/
242 			#define LPS_BI_TP_TH		12 /*Mbps*//*TX + RX*/
243 			#define LPS_TP_CHK_CNT	5 /*10s*/
244 			#define LPS_CHK_PKTS_TX 100
245 			#define LPS_CHK_PKTS_RX 100
246 		#endif
247 	#endif
248 
249 	#ifdef CONFIG_LPS_LCLK
250 	/*#define CONFIG_DETECT_CPWM_BY_POLLING*/
251 	#define CONFIG_LPS_RPWM_TIMER
252 	#if defined(CONFIG_LPS_RPWM_TIMER) || defined(CONFIG_DETECT_CPWM_BY_POLLING)
253 	#define LPS_RPWM_WAIT_MS 300
254 	#endif
255 	#define CONFIG_LPS_LCLK_WD_TIMER /* Watch Dog timer in LPS LCLK */
256 	/*#define CONFIG_LPS_PG*/
257 	#endif
258 
259 	#ifdef CONFIG_IPS
260 	#define CONFIG_IPS_CHECK_IN_WD /* Do IPS Check in WatchDog. */
261 	/*#define CONFIG_FWLPS_IN_IPS*/ /* issue H2C command to let FW do LPS when entering IPS */
262 	#endif
263 
264 	#ifdef CONFIG_LPS
265 		#define CONFIG_WMMPS_STA 1
266 	#endif /* CONFIG_LPS */
267 #endif /* CONFIG_POWER_SAVING */
268 
269 #ifdef CONFIG_BT_COEXIST
270 	/* necessary for PHYDM and BT-Coex */
271 	#define BT_30_SUPPORT 1
272 
273 	#ifndef CONFIG_LPS
274 		#define CONFIG_LPS	/* download reserved page to FW */
275 	#endif
276 #else /* !CONFIG_BT_COEXIST */
277 	#define BT_30_SUPPORT 0
278 #endif /* !CONFIG_BT_COEXIST */
279 
280 #ifdef CONFIG_WOWLAN
281 	#define CONFIG_GTK_OL
282 	/* #define CONFIG_ARP_KEEP_ALIVE */
283 #endif /* CONFIG_WOWLAN */
284 
285 #ifdef CONFIG_GPIO_WAKEUP
286 	#ifndef WAKEUP_GPIO_IDX
287 		#define WAKEUP_GPIO_IDX	10	/* WIFI Chip Side */
288 	#endif /*!WAKEUP_GPIO_IDX*/
289 #endif /* CONFIG_GPIO_WAKEUP */
290 
291 #ifdef CONFIG_ANTENNA_DIVERSITY
292 #define CONFIG_HW_ANTENNA_DIVERSITY
293 #endif /* CONFIG_ANTENNA_DIVERSITY */
294 
295 #ifdef CONFIG_PLATFORM_RTK129X
296 	#ifdef CONFIG_REDUCE_TX_CPU_LOADING
297 	#undef CONFIG_REDUCE_TX_CPU_LOADING
298 	#endif
299 #endif
300 
301 /*
302  * Debug Related Config
303  */
304 #ifdef CONFIG_RTW_DEBUG
305 	#define DBG	1	/* for ODM & BTCOEX debug */
306 #else /* !CONFIG_RTW_DEBUG */
307 	#define DBG	0	/* for ODM & BTCOEX debug */
308 #endif /* CONFIG_RTW_DEBUG */
309 
310 #define DBG_CONFIG_ERROR_DETECT
311 /*#define DBG_XMIT_BUF*/
312 /*#define DBG_XMIT_BUF_EXT*/
313 /*#define CONFIG_FW_C2H_DEBUG*/
314