net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723cs / include / drv_conf.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __DRV_CONF_H__
21 #define __DRV_CONF_H__
22 #include "autoconf.h"
23 #include "hal_ic_cfg.h"
24
25 #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
26
27         #error "Shall be Linux or Windows, but not both!\n"
28
29 #endif
30
31 #if defined(CONFIG_MCC_MODE) && (!defined(CONFIG_CONCURRENT_MODE))
32
33         #error "Enable CONCURRENT_MODE before enable MCC MODE\n"
34
35 #endif
36
37 #if defined(CONFIG_MCC_MODE) && defined(CONFIG_BT_COEXIST)
38
39         #error "Disable BT COEXIST before enable MCC MODE\n"
40
41 #endif
42
43 #if defined(CONFIG_MCC_MODE) && defined(CONFIG_TDLS)
44
45         #error "Disable TDLS before enable MCC MODE\n"
46
47 #endif
48
49 #if defined(CONFIG_RTW_80211R) && !defined(CONFIG_LAYER2_ROAMING)
50
51         #error "Enable CONFIG_LAYER2_ROAMING before enable CONFIG_RTW_80211R\n"
52
53 #endif
54
55 /* Older Android kernel doesn't has CONFIG_ANDROID defined,
56  * add this to force CONFIG_ANDROID defined */
57 #ifdef CONFIG_PLATFORM_ANDROID
58         #ifndef CONFIG_ANDROID
59                 #define CONFIG_ANDROID
60         #endif
61 #endif
62
63 #ifdef CONFIG_ANDROID
64         /* Some Android build will restart the UI while non-printable ascii is passed
65         * between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID
66         * for Android here. If you are sure there is no risk on your system about this,
67         * mask this macro define to support non-printable ascii ssid.
68         * #define CONFIG_VALIDATE_SSID */
69
70         /* Android expect dbm as the rx signal strength unit */
71         #define CONFIG_SIGNAL_DISPLAY_DBM
72 #endif
73
74 /*
75 #if defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_RESUME_IN_WORKQUEUE)
76         #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
77         #undef CONFIG_RESUME_IN_WORKQUEUE
78 #endif
79
80 #if defined(CONFIG_ANDROID_POWER) && defined(CONFIG_RESUME_IN_WORKQUEUE)
81         #warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
82         #undef CONFIG_RESUME_IN_WORKQUEUE
83 #endif
84 */
85
86 #ifdef CONFIG_RESUME_IN_WORKQUEUE /* this can be removed, because there is no case for this... */
87         #if !defined(CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER)
88                 #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER will suffer from the danger of wifi's unfunctionality..."
89                 #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..."
90         #endif
91 #endif
92
93 /* About USB VENDOR REQ */
94 #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
95         #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically"
96         #define CONFIG_USB_VENDOR_REQ_MUTEX
97 #endif
98 #if defined(CONFIG_VENDOR_REQ_RETRY) &&  !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
99         #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically"
100         #define CONFIG_USB_VENDOR_REQ_MUTEX
101 #endif
102
103 #if !defined(CONFIG_AP_MODE) && defined(CONFIG_DFS_MASTER)
104         #warning "undef CONFIG_DFS_MASTER because CONFIG_AP_MODE is not defined"
105         #undef CONFIG_DFS_MASTER
106 #endif
107
108 #define RTW_SCAN_SPARSE_MIRACAST 1
109 #define RTW_SCAN_SPARSE_BG 0
110 #define RTW_SCAN_SPARSE_ROAMING_ACTIVE 1
111
112 #ifndef CONFIG_RTW_HIQ_FILTER
113         #define CONFIG_RTW_HIQ_FILTER 1
114 #endif
115
116 #ifndef CONFIG_RTW_FORCE_IGI_LB
117         #define CONFIG_RTW_FORCE_IGI_LB 0
118 #endif
119
120 #ifndef CONFIG_RTW_ADAPTIVITY_EN
121         #define CONFIG_RTW_ADAPTIVITY_EN 0
122 #endif
123
124 #ifndef CONFIG_RTW_ADAPTIVITY_MODE
125         #define CONFIG_RTW_ADAPTIVITY_MODE 0
126 #endif
127
128 #ifndef CONFIG_RTW_ADAPTIVITY_DML
129         #define CONFIG_RTW_ADAPTIVITY_DML 0
130 #endif
131
132 #ifndef CONFIG_RTW_ADAPTIVITY_DC_BACKOFF
133         #define CONFIG_RTW_ADAPTIVITY_DC_BACKOFF 2
134 #endif
135
136 #ifndef CONFIG_RTW_ADAPTIVITY_TH_L2H_INI
137         #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0
138 #endif
139
140 #ifndef CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF
141         #define CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 0
142 #endif
143
144 #ifndef CONFIG_RTW_EXCL_CHS
145         #define CONFIG_RTW_EXCL_CHS {0}
146 #endif
147
148 #ifndef CONFIG_RTW_DFS_REGION_DOMAIN
149         #define CONFIG_RTW_DFS_REGION_DOMAIN 0
150 #endif
151
152 #ifndef CONFIG_TXPWR_BY_RATE_EN
153 #define CONFIG_TXPWR_BY_RATE_EN 2 /* by efuse */
154 #endif
155 #ifndef CONFIG_TXPWR_LIMIT_EN
156 #define CONFIG_TXPWR_LIMIT_EN 2 /* by efuse */
157 #endif
158
159 /* compatible with old fashion configuration */
160 #if defined(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY)
161         #undef CONFIG_TXPWR_BY_RATE_EN
162         #undef CONFIG_TXPWR_LIMIT_EN
163         #define CONFIG_TXPWR_BY_RATE_EN 1
164         #define CONFIG_TXPWR_LIMIT_EN 1
165 #elif defined(CONFIG_CALIBRATE_TX_POWER_TO_MAX)
166         #undef CONFIG_TXPWR_BY_RATE_EN
167         #undef CONFIG_TXPWR_LIMIT_EN
168         #define CONFIG_TXPWR_BY_RATE_EN 1
169         #define CONFIG_TXPWR_LIMIT_EN 0
170 #endif
171
172 #ifndef RTW_DEF_MODULE_REGULATORY_CERT
173         #define RTW_DEF_MODULE_REGULATORY_CERT 0
174 #endif
175
176 #if RTW_DEF_MODULE_REGULATORY_CERT
177         /* force enable TX power by rate and TX power limit */
178         #undef CONFIG_TXPWR_BY_RATE_EN
179         #undef CONFIG_TXPWR_LIMIT_EN
180         #define CONFIG_TXPWR_BY_RATE_EN 1
181         #define CONFIG_TXPWR_LIMIT_EN 1
182 #endif
183
184 #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_1SS
185         #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_1SS {0xFF, 0xFF, 0xFF, 0xFF}
186 #endif
187 #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_2SS
188         #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_2SS {0xFF, 0xFF, 0xFF, 0xFF}
189 #endif
190 #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_3SS
191         #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_3SS {0xFF, 0xFF, 0xFF, 0xFF}
192 #endif
193 #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_4SS
194         #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_4SS {0xFF, 0xFF, 0xFF, 0xFF}
195 #endif
196
197 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_A
198         #define CONFIG_RTW_TARGET_TX_PWR_2G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
199 #endif
200
201 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_B
202         #define CONFIG_RTW_TARGET_TX_PWR_2G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
203 #endif
204
205 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_C
206         #define CONFIG_RTW_TARGET_TX_PWR_2G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
207 #endif
208
209 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_D
210         #define CONFIG_RTW_TARGET_TX_PWR_2G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
211 #endif
212
213 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_A
214         #define CONFIG_RTW_TARGET_TX_PWR_5G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1}
215 #endif
216
217 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_B
218         #define CONFIG_RTW_TARGET_TX_PWR_5G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1}
219 #endif
220
221 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_C
222         #define CONFIG_RTW_TARGET_TX_PWR_5G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1}
223 #endif
224
225 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_D
226         #define CONFIG_RTW_TARGET_TX_PWR_5G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1}
227 #endif
228
229 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_2G
230         #define CONFIG_RTW_AMPLIFIER_TYPE_2G 0
231 #endif
232
233 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_5G
234         #define CONFIG_RTW_AMPLIFIER_TYPE_5G 0
235 #endif
236
237 #ifndef CONFIG_RTW_RFE_TYPE
238         #define CONFIG_RTW_RFE_TYPE 64
239 #endif
240
241 #ifndef CONFIG_RTW_GLNA_TYPE
242         #define CONFIG_RTW_GLNA_TYPE 0
243 #endif
244
245 #ifndef CONFIG_RTW_PLL_REF_CLK_SEL
246         #define CONFIG_RTW_PLL_REF_CLK_SEL 0x0F
247 #endif
248
249 #ifndef CONFIG_IFACE_NUMBER
250         #ifdef CONFIG_CONCURRENT_MODE
251                 #define CONFIG_IFACE_NUMBER     2
252         #else
253                 #define CONFIG_IFACE_NUMBER     1
254         #endif
255 #endif
256
257 #ifndef CONFIG_CONCURRENT_MODE
258         #if (CONFIG_IFACE_NUMBER > 1)
259                 #error "CONFIG_IFACE_NUMBER over 1,but CONFIG_CONCURRENT_MODE not defined"
260         #endif
261 #endif
262
263 #if (CONFIG_IFACE_NUMBER == 0)
264         #error "CONFIG_IFACE_NUMBER cound not equel to 0 !!"
265 #endif
266
267 #if (CONFIG_IFACE_NUMBER > 3)
268         #error "Not support over 3 interfaces yet !!"
269 #endif
270
271 #if (CONFIG_IFACE_NUMBER > 8)   /*IFACE_ID_MAX*/
272         #error "HW count not support over 8 interfaces !!"
273 #endif
274
275 #if (CONFIG_IFACE_NUMBER > 2)
276         #define CONFIG_MI_WITH_MBSSID_CAM
277
278         #ifdef CONFIG_MI_WITH_MBSSID_CAM
279                 #define CONFIG_MBSSID_CAM
280                 #if defined(CONFIG_RUNTIME_PORT_SWITCH)
281                         #undef CONFIG_RUNTIME_PORT_SWITCH
282                 #endif
283         #endif
284
285         #ifdef CONFIG_AP_MODE
286                 #define CONFIG_SWTIMER_BASED_TXBCN
287                 /*#define CONFIG_FW_BASED_BCN*/
288         #endif
289 #endif
290
291 #define MACID_NUM_SW_LIMIT 32
292 #define SEC_CAM_ENT_NUM_SW_LIMIT 32
293
294 #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8814A)
295         #define CONFIG_IEEE80211_BAND_5GHZ
296 #endif
297
298 #if defined(CONFIG_WOWLAN) && (defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C))
299         #define CONFIG_WOW_PATTERN_HW_CAM
300 #endif
301
302 /*
303         Mark CONFIG_DEAUTH_BEFORE_CONNECT by Arvin 2015/07/20
304         If the failure of Wi-Fi connection is due to some irregular disconnection behavior (like unplug dongle,
305         power down etc.) in last time, we can unmark this flag to avoid some unpredictable response from AP.
306 */
307 /*#define CONFIG_DEAUTH_BEFORE_CONNECT */
308
309 /*#define CONFIG_WEXT_DONT_JOIN_BYSSID  */
310 /* #include <rtl871x_byteorder.h> */
311
312
313 /*#define CONFIG_DOSCAN_IN_BUSYTRAFFIC  */
314
315 /*Don't release SDIO irq in suspend/resume procedure*/
316 #define CONFIG_RTW_SDIO_KEEP_IRQ        0
317
318 /*
319  * Add by Lucas@2016/02/15
320  * For RX Aggregation
321  */
322 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_USB_RX_AGGREGATION)
323         #define RTW_RX_AGGREGATION
324 #endif /* CONFIG_SDIO_HCI || CONFIG_USB_RX_AGGREGATION */
325
326 #endif /* __DRV_CONF_H__ */