xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852be/include/autoconf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2019 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 /***** temporarily flag for IC development phase *******/
16 #define CONFIG_SINGLE_IMG
17 
18 /*#define CONFIG_NO_FW*/
19 /*#define CONFIG_DISABLE_ODM*/
20 
21 #define RTW_WKARD_CORE_RSSI_V1
22 
23 #ifdef RTW_WKARD_CORE_RSSI_V1
24 #define CONFIG_RX_PSTS_PER_PKT
25 #define CONFIG_SIGNAL_STAT_PROCESS
26 #endif
27 
28 #ifndef DBG_MEM_ALLOC
29 #define DBG_MEM_ALLOC
30 
31 #define DBG_PHL_MEM_ALLOC
32 #define DBG_HAL_MAC_MEM_MOINTOR
33 #define DBG_HAL_MEM_MOINTOR
34 #endif
35 /*#define CONFIG_PHL_USE_KMEM_ALLOC*/
36 #define CONFIG_HW_RTS
37 
38 /*
39  * Work around Config
40  */
41 #define RTW_WKARD_DIS_PROBE_REQ_RPT_TO_HOSTAPD
42 
43 /***** temporarily flag *******/
44 /*
45  * Public  General Config
46  */
47 #define AUTOCONF_INCLUDED
48 #define DRV_NAME "rtl8852be"
49 
50 #define CONFIG_PCI_HCI
51 
52 #define CONFIG_PCIE_TRX_MIT
53 #ifdef CONFIG_PCIE_TRX_MIT
54 	#define PCIE_RX_INT_MIT_TIMER 4096
55 	/*#define CONFIG_PCIE_TRX_MIT_FIX*/ /*  if defined, the mitigation mode will be set to fixed */
56 	#ifndef CONFIG_PCIE_TRX_MIT_FIX
57 	#define CONFIG_PCIE_TRX_MIT_DYN
58 	#endif
59 #endif
60 
61 #define CONFIG_RPQ_AGG_NUM 30
62 
63 /*
64  * Wi-Fi Functions Config
65  */
66 
67 /*#define CONFIG_RECV_REORDERING_CTRL*/
68 
69 #define CONFIG_80211N_HT
70 #define CONFIG_80211AC_VHT
71 #define CONFIG_80211AX_HE
72 #ifdef CONFIG_80211AC_VHT
73 	#ifndef CONFIG_80211N_HT
74 		#define CONFIG_80211N_HT
75 	#endif
76 #endif
77 
78 #ifdef CONFIG_80211AX_HE
79 	#ifndef CONFIG_80211N_HT
80 		#define CONFIG_80211N_HT
81 	#endif
82 	#ifndef CONFIG_80211AC_VHT
83 		#define CONFIG_80211AC_VHT
84 	#endif
85 #endif
86 
87 #define CONFIG_BEAMFORMING
88 #ifdef CONFIG_BEAMFORMING
89 /*#define RTW_WKARD_TX_DISABLE_BFEE*/
90 #endif
91 
92 /*#define CONFIG_IOCTL_CFG80211*/
93 #ifdef CONFIG_IOCTL_CFG80211
94 	/*#define RTW_USE_CFG80211_STA_EVENT*/ /* Indecate new sta asoc through cfg80211_new_sta */
95 	#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
96 	/*#define CONFIG_DEBUG_CFG80211*/
97 	#define CONFIG_SET_SCAN_DENY_TIMER
98 #endif
99 #define CONFIG_TX_AMSDU
100 #ifdef CONFIG_TX_AMSDU
101 	#ifdef CONFIG_PLATFORM_RTL8198D
102 	#define CONFIG_TX_AMSDU_HW_MODE	1
103 	#else
104 	#define CONFIG_TX_AMSDU_SW_MODE	1
105 	#endif
106 #endif
107 
108 /*
109  * Internal  General Config
110  */
111 /*#define CONFIG_PWRCTRL*/
112 #define CONFIG_TRX_BD_ARCH	/* PCI only */
113 #define USING_RX_TAG
114 
115 #define CONFIG_EMBEDDED_FWIMG
116 
117 #ifdef CONFIG_EMBEDDED_FWIMG
118 	#define	LOAD_FW_HEADER_FROM_DRIVER
119 #endif
120 /*#define CONFIG_FILE_FWIMG*/
121 
122 /* #define CONFIG_XMIT_ACK */
123 #ifdef CONFIG_XMIT_ACK
124 	#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
125 #endif
126 
127 #define BUF_DESC_ARCH		/* if defined, hardware follows Rx buffer descriptor architecture */
128 
129 #ifdef CONFIG_POWER_SAVING
130 
131 	#define CONFIG_IPS
132 	#ifdef CONFIG_IPS
133 	#endif
134 
135 	#define CONFIG_LPS
136 
137 	#if defined(CONFIG_LPS)
138 		/*#define CONFIG_LPS_LCLK*/ /* 32K */
139 	#endif
140 
141 	#ifdef CONFIG_LPS_LCLK
142 		#define CONFIG_XMIT_THREAD_MODE
143 		#define LPS_RPWM_WAIT_MS 300
144 	#endif
145 #endif
146 
147 #ifdef CONFIG_POWER_SAVE
148 	/* #define CONFIG_RTW_IPS */
149 	/* #define CONFIG_RTW_LPS */
150 
151 	#ifdef CONFIG_RTW_LPS
152 		#define CONFIG_RTW_LPS_RFOFF
153 	#endif
154 
155 	#if defined(CONFIG_RTW_IPS) || defined(CONFIG_RTW_LPS)
156 		#define CONFIG_PS_FW_DBG
157 	#endif
158 #endif
159 
160 	/*#define CONFIG_ANTENNA_DIVERSITY*/
161 
162 
163 /*#define CONFIG_PCI_ASPM*/
164 #ifdef CONFIG_PCI_ASPM
165 #define CONFIG_PCI_DYNAMIC_ASPM
166 #endif
167 
168 #define CONFIG_AP_MODE
169 #ifdef CONFIG_AP_MODE
170 	#define CONFIG_NATIVEAP_MLME
171 	#ifndef CONFIG_NATIVEAP_MLME
172 		#define CONFIG_HOSTAPD_MLME
173 	#endif
174 	/*#define CONFIG_FIND_BEST_CHANNEL*/
175 	/*#define CONFIG_AUTO_AP_MODE*/
176 #endif
177 
178 #define CONFIG_P2P
179 #ifdef CONFIG_P2P
180 	/* The CONFIG_WFD is for supporting the Wi-Fi display */
181 	#define CONFIG_WFD
182 
183 	#define CONFIG_P2P_REMOVE_GROUP_INFO
184 
185 	/*#define CONFIG_DBG_P2P*/
186 
187 	#define CONFIG_P2P_PS
188 	/*#define CONFIG_P2P_IPS*/
189 	#define CONFIG_P2P_OP_CHK_SOCIAL_CH
190 	#define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT  /* replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */
191 	/*#define CONFIG_P2P_INVITE_IOT*/
192 #endif
193 
194 /* Added by Kurt 20110511 */
195 #ifdef CONFIG_TDLS
196 	#define CONFIG_TDLS_DRIVER_SETUP
197 #if 0
198 	#ifndef CONFIG_WFD
199 		#define CONFIG_WFD
200 	#endif
201 	#define CONFIG_TDLS_AUTOSETUP
202 #endif
203 	#define CONFIG_TDLS_AUTOCHECKALIVE
204 	/* #define CONFIG_TDLS_CH_SW */	/* Enable this flag only when we confirm that TDLS CH SW is supported in FW */
205 #endif
206 
207 #define CONFIG_SKB_COPY	/* for amsdu */
208 
209 /*#define CONFIG_RTW_LED*/
210 #ifdef CONFIG_RTW_LED
211 	/*#define CONFIG_RTW_SW_LED*/
212 	#ifdef CONFIG_RTW_SW_LED
213 		/*#define CONFIG_RTW_LED_HANDLED_BY_CMD_THREAD*/
214 	#endif
215 #endif /* CONFIG_RTW_LED */
216 
217 #define CONFIG_GLOBAL_UI_PID
218 
219 /*#define CONFIG_ADAPTOR_INFO_CACHING_FILE*/ /* now just applied on 8192cu only, should make it general...*/
220 /*#define CONFIG_RESUME_IN_WORKQUEUE*/
221 /*#define CONFIG_SET_SCAN_DENY_TIMER*/
222 #define CONFIG_LONG_DELAY_ISSUE
223 /*#define CONFIG_SIGNAL_DISPLAY_DBM*/ /* display RX signal with dbm */
224 #ifdef CONFIG_SIGNAL_DISPLAY_DBM
225 /*#define CONFIG_BACKGROUND_NOISE_MONITOR*/
226 #endif
227 
228 
229 /*
230  * Software feature Related Config
231  */
232 
233 #define CONFIG_SCAN_BACKOP_STA
234 #define CONFIG_RTW_REDUCE_MEM
235 
236 /*
237  * Interface  Related Config
238  */
239 
240 /* #define CONFIG_RTW_FORCE_PCI_MSI_DISABLE */
241 
242 /*
243  * HAL  Related Config
244  */
245 #define CONFIG_RX_PACKET_APPEND_FCS
246 
247 
248 #define DISABLE_BB_RF	0
249 
250 #ifdef CONFIG_MP_INCLUDED
251 	#define MP_DRIVER 1
252 #else
253 	#define MP_DRIVER 0
254 #endif
255 
256 #ifndef EFUSE_MAP_PATH
257 	#define EFUSE_MAP_PATH "/system/etc/wifi/wifi_efuse.map"
258 #endif
259 #ifndef WIFIMAC_PATH
260 	#define WIFIMAC_PATH "/data/wifimac.txt"
261 #endif
262 
263 /* Use cmd frame to issue beacon. Use a fixed buffer for beacon. */
264 #define CONFIG_BCN_ICF
265 
266 #ifdef CONFIG_HWSIM
267 /* Use pure sw beacon */
268 #undef CONFIG_BCN_ICF
269 #endif
270 
271 /* #define RTL8814BE_AMPDU_PRE_TX_OFF */
272 
273 /*
274  * Platform  Related Config
275  */
276 
277 
278 /* #define	CONFIG_TX_EARLY_MODE */
279 
280 
281 /*
282  * Debug Related Config
283  */
284 #define DBG	1
285 
286 
287 /*#define DBG_CONFIG_ERROR_DETECT*/
288 /* #define DBG_CONFIG_ERROR_DETECT_INT */
289 /* #define DBG_CONFIG_ERROR_RESET */
290 
291 /* #define DBG_IO */
292 /* #define DBG_DELAY_OS */
293 /* #define DBG_MEM_ALLOC */
294 /* #define DBG_IOCTL */
295 
296 /* #define DBG_TX */
297 /* #define DBG_XMIT_BUF */
298 /* #define DBG_XMIT_BUF_EXT */
299 /* #define DBG_TX_DROP_FRAME */
300 
301 /* #define DBG_RX_DROP_FRAME */
302 /* #define DBG_RX_SEQ */
303 /* #define DBG_RX_SIGNAL_DISPLAY_PROCESSING */
304 /* #define DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED "jeff-ap" */
305 
306 /* #define DBG_ROAMING_TEST */
307 
308 /* #define DBG_HAL_INIT_PROFILING */
309 
310 /*#define DBG_MEMORY_LEAK*/
311 /* #define CONFIG_FW_C2H_DEBUG */
312 
313 #define CONFIG_DBG_COUNTER
314 #define	DBG_RX_DFRAME_RAW_DATA
315 /*#define	DBG_TXBD_DESC_DUMP*/
316 #define CONFIG_RTW_EFUSE_DBG_DUMP	1
317 
318 #define CONFIG_PCI_BCN_POLLING
319 //#define RTW_PHL_TEST_FPGA //For 8852A PCIE FPGA TEST
320 
321 /* #define CONFIG_DMA_USE_COHERENT_MEM */
322 
323 #ifdef CONFIG_DMA_USE_COHERENT_MEM
324 /*#define CONFIG_DMA_TX_USE_COHERENT_MEM*/
325 #define CONFIG_DMA_RX_USE_COHERENT_MEM
326 #else
327 #ifndef CONFIG_DIS_DYN_RXBUF
328 #define CONFIG_DYNAMIC_RX_BUF
329 #endif
330 #endif
331 
332 /*#define CONFIG_RTW_BTM_ROAM*/
333 /*#define CONFIG_RTW_80211R*/
334 
335 #ifdef CONFIG_RTW_MBO
336 	#ifndef CONFIG_RTW_WNM
337 		#define CONFIG_RTW_WNM
338 	#endif
339 	#ifndef CONFIG_RTW_80211K
340 		#define CONFIG_RTW_80211K
341 	#endif
342 #endif /* CONFIG_RTW_MBO */
343 
344 /* Separate TRX path into different CPUs */
345 /*#define CONFIG_PHL_CPU_BALANCE*/
346 #ifdef CONFIG_PHL_CPU_BALANCE
347 
348 #define CONFIG_PHL_CPU_BALANCE_TX
349 #define CPU_ID_TX_PHL_0 1
350 
351 /*#define CONFIG_PHL_CPU_BALANCE_RX*/
352 #define CPU_ID_RX_CORE_0 2
353 
354 #endif
355 
356 #ifdef RTW_PHL_TEST_FPGA
357 
358 	#ifndef RTW_PHL_TX
359 	#define RTW_PHL_TX
360 	#endif
361 	#ifndef RTW_PHL_RX
362 	#define RTW_PHL_RX
363 	#endif
364 	#ifndef DIRTY_FOR_WORK
365 	#define DIRTY_FOR_WORK
366 	#endif
367 	#ifndef CONFIG_DYNAMIC_RX_BUF
368 	#define CONFIG_DYNAMIC_RX_BUF
369 	#endif
370 	#ifndef RTW_PHL_DBG_CMD
371 	#define RTW_PHL_DBG_CMD
372 	#endif
373 	#ifndef CONFIG_DRV_FAKE_AP
374 	#error "Please enable CONFIG_DRV_FAKE_AP in Makefile before Beacon ready\n"
375 	#endif
376 	#ifndef RTW_PHL_FWDL
377 	#define RTW_PHL_FWDL
378 	#endif
379 
380 	#ifdef CONFIG_RTW_NAPI
381 	#undef CONFIG_RTW_NAPI
382 	#endif
383 	#ifdef CONFIG_RTW_GRO
384 	#undef CONFIG_RTW_GRO
385 	#endif
386 	#ifdef CONFIG_RTW_NETIF_SG
387 	#undef CONFIG_RTW_NETIF_SG
388 	#endif
389 
390 	#if 1
391 	#define	DBGP(fmt, args...)	printk("dbg [%s][%d]"fmt, __FUNCTION__, __LINE__, ## args)
392 	#else
393 	#define DBGP(arg...) do {} while (0)
394 	#endif
395 
396 #else //RTW_PHL_TEST_FPGA
397 
398 	#define DBGP(arg...) do {} while (0)
399 
400 #endif
401 
402 /* Platform dependent config, shall put on the bottom of this file */
403 #ifdef CONFIG_PLATFORM_RTL8198D
404 #include "autoconf_mips_98d.h"
405 #endif
406 
407 /* Platform dependent config, shall put on the bottom of this file */
408 #ifdef CONFIG_I386_BUILD_VERIFY
409 #include "autoconf_i386_ap_func.h"
410 #endif
411 
412 #ifdef CONFIG_ARCH_CORTINA
413 #include "autoconf_arm_9617b.h"
414 #endif /* CONFIG_ARCH_CORTINA */
415 
416