• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2015 - 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 "88x2CS"
21 #define DRV_NAME "rtl88x2cs"
22 
23 /* Set CONFIG_RTL8822C from Makefile */
24 #ifndef CONFIG_RTL8822C
25 #define CONFIG_RTL8822C
26 #endif
27 #define CONFIG_SDIO_HCI
28 #define PLATFORM_LINUX
29 
30 
31 /*
32  * Wi-Fi Functions Config
33  */
34 
35 #define CONFIG_RECV_REORDERING_CTRL
36 
37 #define CONFIG_80211N_HT
38 #define CONFIG_80211AC_VHT
39 #ifdef CONFIG_80211AC_VHT
40 	#ifndef CONFIG_80211N_HT
41 		#define CONFIG_80211N_HT
42 	#endif
43 #endif
44 
45 /* Set CONFIG_IOCTL_CFG80211 from Makefile */
46 #ifdef CONFIG_IOCTL_CFG80211
47 	/*
48 	 * Indecate new sta asoc through cfg80211_new_sta
49 	 * If kernel version >= 3.2 or
50 	 * version < 3.2 but already apply cfg80211 patch,
51 	 * RTW_USE_CFG80211_STA_EVENT must be defiend!
52 	 */
53 	/* Set RTW_USE_CFG80211_STA_EVENT from Makefile */
54 	#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
55 	/*#define CONFIG_DEBUG_CFG80211*/
56 	#define CONFIG_SET_SCAN_DENY_TIMER
57 #endif /* CONFIG_IOCTL_CFG80211 */
58 
59 #ifdef CONFIG_AP_MODE
60 	#define CONFIG_NATIVEAP_MLME
61 	#ifndef CONFIG_NATIVEAP_MLME
62 		#define CONFIG_HOSTAPD_MLME
63 	#endif
64 	/*#define CONFIG_FIND_BEST_CHANNEL*/
65 #endif
66 
67 #ifdef CONFIG_P2P
68 	#define CONFIG_WFD	/* Wi-Fi display */
69 	#define CONFIG_P2P_REMOVE_GROUP_INFO
70 	/*#define CONFIG_DBG_P2P*/
71 	#define CONFIG_P2P_PS
72 	/*#define CONFIG_P2P_IPS*/
73 	#define CONFIG_P2P_OP_CHK_SOCIAL_CH
74 	#define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT  /* Replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */
75 	/*#define CONFIG_P2P_INVITE_IOT*/
76 #endif /* CONFIG_P2P */
77 
78 /* Set CONFIG_TDLS from Makefile */
79 #ifdef CONFIG_TDLS
80 	#define CONFIG_TDLS_DRIVER_SETUP
81 #if 0
82 	#ifndef CONFIG_WFD
83 		#define CONFIG_WFD
84 	#endif
85 	#define CONFIG_TDLS_AUTOSETUP
86 #endif
87 	#define CONFIG_TDLS_AUTOCHECKALIVE
88 	/*
89 	 * Enable "CONFIG_TDLS_CH_SW" by default,
90 	 * however limit it to only work in wifi logo test mode
91 	 * but not in normal mode currently
92 	 */
93 	#define CONFIG_TDLS_CH_SW
94 #endif /* CONFIG_TDLS */
95 
96 /*#define CONFIG_RTW_80211K*/
97 
98 #define CONFIG_BEAMFORMING
99 
100 
101 /*
102  * Hareware/Firmware Related Config
103  */
104 /* Set CONFIG_BT_COEXIST from Makefile */
105 /*#define CONFIG_ANTENNA_DIVERSITY*/
106 /*#define SUPPORT_HW_RFOFF_DETECTED*/
107 /*#define CONFIG_RTW_LED*/
108 #ifdef CONFIG_RTW_LED
109 	/*#define CONFIG_RTW_SW_LED*/
110 #endif /* CONFIG_RTW_LED */
111 
112 #define CONFIG_XMIT_ACK
113 #ifdef CONFIG_XMIT_ACK
114 	#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
115 #endif
116 
117 
118 #define DISABLE_BB_RF		0
119 #define RTW_NOTCH_FILTER	0 /* 0:Disable, 1:Enable */
120 
121 #define CONFIG_SUPPORT_TRX_SHARED
122 #ifdef CONFIG_SUPPORT_TRX_SHARED
123 #define DFT_TRX_SHARE_MODE	2
124 #endif
125 
126 /*
127  * Software feature Related Config
128  */
129 #define RTW_HALMAC		/* Use HALMAC architecture, necessary for 8822B */
130 #define CONFIG_RECV_THREAD_MODE
131 #ifdef CONFIG_RECV_THREAD_MODE
132 #define RTW_RECV_THREAD_HIGH_PRIORITY
133 #endif/*CONFIG_RECV_THREAD_MODE*/
134 
135 /*
136  * Interface Related Config
137  */
138 #define CONFIG_TX_AGGREGATION
139 #define CONFIG_XMIT_THREAD_MODE	/* necessary for SDIO */
140 #define RTW_XMIT_THREAD_HIGH_PRIORITY
141 #define RTW_XMIT_THREAD_HIGH_PRIORITY_AGG
142 #define CONFIG_SDIO_HOOK_DEV_SHUTDOWN
143 /*#define CONFIG_SDIO_TX_ENABLE_AVAL_INT*/ /* not implemented yet */
144 #define SDIO_FREE_XMIT_BUF_SEMA
145 /* #define DBG_SDIO_FREE_XMIT_BUF_SEMA */
146 /* #define CONFIG_SDIO_TX_FORMAT_DUMMY_AUTO */
147 #define CONFIG_SDIO_RX_COPY
148 #define DBG_SDIO	1
149 
150 
151 /*
152  * Others
153  */
154 /* #define CONFIG_MAC_LOOPBACK_DRIVER */
155 #define CONFIG_SKB_COPY		/* for amsdu */
156 #define CONFIG_NEW_SIGNAL_STAT_PROCESS
157 #define CONFIG_EMBEDDED_FWIMG
158 #ifdef CONFIG_EMBEDDED_FWIMG
159 	#define	LOAD_FW_HEADER_FROM_DRIVER
160 #endif
161 /*#define CONFIG_FILE_FWIMG*/
162 #define CONFIG_LONG_DELAY_ISSUE
163 /*#define CONFIG_PATCH_JOIN_WRONG_CHANNEL*/
164 
165 #ifdef CONFIG_RTW_NAPI
166 #define CONFIG_RTW_NAPI_DYNAMIC
167 #define CONFIG_RTW_NAPI_V2
168 #endif
169 
170 /*
171  * Platform
172  */
173 #ifdef CONFIG_PLATFORM_INTEL_BYT
174 #ifdef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
175 #undef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
176 #endif
177 #endif /* CONFIG_PLATFORM_INTEL_BYT */
178 
179 
180 /*
181  * Auto Config Section
182  */
183 #ifdef CONFIG_MAC_LOOPBACK_DRIVER
184 #undef CONFIG_IOCTL_CFG80211
185 #undef CONFIG_AP_MODE
186 #undef CONFIG_NATIVEAP_MLME
187 #undef CONFIG_POWER_SAVING
188 #undef CONFIG_BT_COEXIST
189 #undef CONFIG_ANTENNA_DIVERSITY
190 #undef SUPPORT_HW_RFOFF_DETECTED
191 #endif /* CONFIG_MAC_LOOPBACK_DRIVER */
192 
193 #ifdef CONFIG_MP_INCLUDED
194 	#define MP_DRIVER	1
195 	#define CONFIG_MP_IWPRIV_SUPPORT
196 #else /* !CONFIG_MP_INCLUDED */
197 	#define MP_DRIVER	0
198 	#undef CONFIG_MP_IWPRIV_SUPPORT
199 #endif /* !CONFIG_MP_INCLUDED */
200 
201 #ifdef CONFIG_POWER_SAVING
202 	#define CONFIG_IPS
203 	#define CONFIG_LPS
204 
205 	#if defined(CONFIG_LPS) && (defined(CONFIG_GSPI_HCI) || defined(CONFIG_SDIO_HCI))
206 	#define CONFIG_LPS_LCLK
207 	#endif
208 
209 	#ifdef CONFIG_LPS
210 		#define CONFIG_CHECK_LEAVE_LPS
211 		#ifndef CONFIG_PLATFORM_INTEL_BYT
212 		#define CONFIG_LPS_SLOW_TRANSITION
213 		#endif /* !CONFIG_PLATFORM_INTEL_BYT */
214 	#endif
215 
216 	#ifdef CONFIG_LPS_LCLK
217 	#define CONFIG_DETECT_CPWM_BY_POLLING
218 	#define DBG_CHECK_FW_PS_STATE
219 	#define CONFIG_LPS_RPWM_TIMER
220 	#if defined(CONFIG_LPS_RPWM_TIMER) || defined(CONFIG_DETECT_CPWM_BY_POLLING)
221 	#define LPS_RPWM_WAIT_MS 300
222 	#endif
223 	#define CONFIG_LPS_LCLK_WD_TIMER /* Watch Dog timer in LPS LCLK */
224 	/* #define CONFIG_LPS_PG */
225 	#endif
226 
227 	#ifdef CONFIG_IPS
228 	#define CONFIG_IPS_CHECK_IN_WD /* Do IPS Check in WatchDog. */
229 	/*#define CONFIG_SWLPS_IN_IPS*/ /* Do SW LPS flow when entering and leaving IPS */
230 	/*#define CONFIG_FWLPS_IN_IPS*/ /* issue H2C command to let FW do LPS when entering IPS */
231 	#endif
232 
233 	#ifdef CONFIG_LPS
234 		#define CONFIG_WMMPS_STA 1
235 	#endif /* CONFIG_LPS */
236 #endif /* CONFIG_POWER_SAVING */
237 
238 #ifdef CONFIG_BT_COEXIST
239 	/* for ODM and outsrc BT-Coex */
240 	#ifndef CONFIG_LPS
241 		#define CONFIG_LPS	/* download reserved page to FW */
242 	#endif
243 	#define CONFIG_SDIO_MULTI_FUNCTION_COEX
244 	#define DBG_SDIO_MULTI_FUNCTION_COEX 0
245 #endif /* !CONFIG_BT_COEXIST */
246 
247 #ifdef CONFIG_GPIO_WAKEUP
248 	#ifndef WAKEUP_GPIO_IDX
249 		/* 1315 module WIFI Chip Side */
250 		#define WAKEUP_GPIO_IDX	10
251 	#endif /* !WAKEUP_GPIO_IDX */
252 #endif /* CONFIG_GPIO_WAKEUP */
253 
254 
255 #ifdef CONFIG_ANTENNA_DIVERSITY
256 #define CONFIG_HW_ANTENNA_DIVERSITY
257 #endif /* CONFIG_ANTENNA_DIVERSITY */
258 
259 
260 /*
261  * Debug Related Config
262  */
263 #ifdef CONFIG_RTW_DEBUG
264 #define DBG	1	/* for ODM & BTCOEX debug */
265 #else /* !CONFIG_RTW_DEBUG */
266 #define DBG	0	/* for ODM & BTCOEX debug */
267 #endif /* !CONFIG_RTW_DEBUG */
268 
269 #define DBG_CONFIG_ERROR_DETECT
270 #if 0
271 #define DBG_XMIT_BUF
272 #define DBG_XMIT_BUF_EXT
273 #define CONFIG_FW_C2H_DEBUG
274 #endif
275 
276 
277 /* #define CONFIG_DISABLE_ODM */
278 /* #define CONFIG_NO_FW */
279 
280