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 /* Older Android kernel doesn't has CONFIG_ANDROID defined, 50 * add this to force CONFIG_ANDROID defined */ 51 #ifdef CONFIG_PLATFORM_ANDROID 52 #ifndef CONFIG_ANDROID 53 #define CONFIG_ANDROID 54 #endif 55 #endif 56 57 #ifdef CONFIG_ANDROID 58 /* Some Android build will restart the UI while non-printable ascii is passed 59 * between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID 60 * for Android here. If you are sure there is no risk on your system about this, 61 * mask this macro define to support non-printable ascii ssid. 62 * #define CONFIG_VALIDATE_SSID */ 63 64 /* Android expect dbm as the rx signal strength unit */ 65 #define CONFIG_SIGNAL_DISPLAY_DBM 66 #endif 67 68 /* 69 #if defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_RESUME_IN_WORKQUEUE) 70 #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 71 #undef CONFIG_RESUME_IN_WORKQUEUE 72 #endif 73 74 #if defined(CONFIG_ANDROID_POWER) && defined(CONFIG_RESUME_IN_WORKQUEUE) 75 #warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 76 #undef CONFIG_RESUME_IN_WORKQUEUE 77 #endif 78 */ 79 80 #ifdef CONFIG_RESUME_IN_WORKQUEUE /* this can be removed, because there is no case for this... */ 81 #if !defined(CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER) 82 #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER will suffer from the danger of wifi's unfunctionality..." 83 #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..." 84 #endif 85 #endif 86 87 /* About USB VENDOR REQ */ 88 #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 89 #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically" 90 #define CONFIG_USB_VENDOR_REQ_MUTEX 91 #endif 92 #if defined(CONFIG_VENDOR_REQ_RETRY) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 93 #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically" 94 #define CONFIG_USB_VENDOR_REQ_MUTEX 95 #endif 96 97 #if !defined(CONFIG_AP_MODE) && defined(CONFIG_DFS_MASTER) 98 #warning "undef CONFIG_DFS_MASTER because CONFIG_AP_MODE is not defined" 99 #undef CONFIG_DFS_MASTER 100 #endif 101 102 #define RTW_SCAN_SPARSE_MIRACAST 1 103 #define RTW_SCAN_SPARSE_BG 0 104 105 #ifndef CONFIG_RTW_HIQ_FILTER 106 #define CONFIG_RTW_HIQ_FILTER 1 107 #endif 108 109 #ifndef CONFIG_RTW_FORCE_IGI_LB 110 #define CONFIG_RTW_FORCE_IGI_LB 0 111 #endif 112 113 #ifndef CONFIG_RTW_ADAPTIVITY_EN 114 #define CONFIG_RTW_ADAPTIVITY_EN 0 115 #endif 116 117 #ifndef CONFIG_RTW_ADAPTIVITY_MODE 118 #define CONFIG_RTW_ADAPTIVITY_MODE 0 119 #endif 120 121 #ifndef CONFIG_RTW_ADAPTIVITY_DML 122 #define CONFIG_RTW_ADAPTIVITY_DML 0 123 #endif 124 125 #ifndef CONFIG_RTW_ADAPTIVITY_DC_BACKOFF 126 #define CONFIG_RTW_ADAPTIVITY_DC_BACKOFF 2 127 #endif 128 129 #ifndef CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 130 #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0 131 #endif 132 133 #ifndef CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 134 #define CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 0 135 #endif 136 137 #ifndef CONFIG_RTW_EXCL_CHS 138 #define CONFIG_RTW_EXCL_CHS {0} 139 #endif 140 141 #ifndef CONFIG_RTW_DFS_REGION_DOMAIN 142 #define CONFIG_RTW_DFS_REGION_DOMAIN 0 143 #endif 144 145 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_A 146 #define CONFIG_RTW_TARGET_TX_PWR_2G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 147 #endif 148 149 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_B 150 #define CONFIG_RTW_TARGET_TX_PWR_2G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 151 #endif 152 153 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_C 154 #define CONFIG_RTW_TARGET_TX_PWR_2G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 155 #endif 156 157 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_D 158 #define CONFIG_RTW_TARGET_TX_PWR_2G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 159 #endif 160 161 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_A 162 #define CONFIG_RTW_TARGET_TX_PWR_5G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1} 163 #endif 164 165 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_B 166 #define CONFIG_RTW_TARGET_TX_PWR_5G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1} 167 #endif 168 169 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_C 170 #define CONFIG_RTW_TARGET_TX_PWR_5G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1} 171 #endif 172 173 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_D 174 #define CONFIG_RTW_TARGET_TX_PWR_5G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1} 175 #endif 176 177 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_2G 178 #define CONFIG_RTW_AMPLIFIER_TYPE_2G 0 179 #endif 180 181 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_5G 182 #define CONFIG_RTW_AMPLIFIER_TYPE_5G 0 183 #endif 184 185 #ifndef CONFIG_RTW_RFE_TYPE 186 #define CONFIG_RTW_RFE_TYPE 64 187 #endif 188 189 #ifndef CONFIG_RTW_GLNA_TYPE 190 #define CONFIG_RTW_GLNA_TYPE 0 191 #endif 192 193 #ifndef CONFIG_RTW_PLL_REF_CLK_SEL 194 #define CONFIG_RTW_PLL_REF_CLK_SEL 0x0F 195 #endif 196 197 #ifndef CONFIG_IFACE_NUMBER 198 #ifdef CONFIG_CONCURRENT_MODE 199 #define CONFIG_IFACE_NUMBER 2 200 #else 201 #define CONFIG_IFACE_NUMBER 1 202 #endif 203 #endif 204 205 #ifndef CONFIG_CONCURRENT_MODE 206 #if (CONFIG_IFACE_NUMBER > 1) 207 #error "CONFIG_IFACE_NUMBER over 1,but CONFIG_CONCURRENT_MODE not defined" 208 #endif 209 #endif 210 211 #if (CONFIG_IFACE_NUMBER == 0) 212 #error "CONFIG_IFACE_NUMBER cound not equel to 0 !!" 213 #endif 214 215 #if (CONFIG_IFACE_NUMBER > 3) 216 #error "Not support over 3 interfaces yet !!" 217 #endif 218 219 #if (CONFIG_IFACE_NUMBER > 8) /*IFACE_ID_MAX*/ 220 #error "HW count not support over 8 interfaces !!" 221 #endif 222 223 #if (CONFIG_IFACE_NUMBER > 2) 224 #define CONFIG_MI_WITH_MBSSID_CAM 225 226 #ifdef CONFIG_MI_WITH_MBSSID_CAM 227 #define CONFIG_MBSSID_CAM 228 #if defined(CONFIG_RUNTIME_PORT_SWITCH) 229 #undef CONFIG_RUNTIME_PORT_SWITCH 230 #endif 231 #endif 232 233 #ifdef CONFIG_AP_MODE 234 #define CONFIG_SWTIMER_BASED_TXBCN 235 /*#define CONFIG_FW_BASED_BCN*/ 236 #endif 237 #endif 238 239 #define MACID_NUM_SW_LIMIT 32 240 #define SEC_CAM_ENT_NUM_SW_LIMIT 32 241 242 #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8814A) 243 #define CONFIG_IEEE80211_BAND_5GHZ 244 #endif 245 246 #ifndef RTW_DEF_MODULE_REGULATORY_CERT 247 #define RTW_DEF_MODULE_REGULATORY_CERT 0 248 #endif 249 250 #if RTW_DEF_MODULE_REGULATORY_CERT 251 /* force enable TX power by rate and TX power limit */ 252 #ifndef CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY 253 #define CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY 254 #endif 255 #endif 256 257 /* 258 Mark CONFIG_DEAUTH_BEFORE_CONNECT by Arvin 2015/07/20 259 If the failure of Wi-Fi connection is due to some irregular disconnection behavior (like unplug dongle, 260 power down etc.) in last time, we can unmark this flag to avoid some unpredictable response from AP. 261 */ 262 /*#define CONFIG_DEAUTH_BEFORE_CONNECT */ 263 264 /*#define CONFIG_WEXT_DONT_JOIN_BYSSID */ 265 /* #include <rtl871x_byteorder.h> */ 266 267 268 /*#define CONFIG_DOSCAN_IN_BUSYTRAFFIC */ 269 270 /* 271 * Add by Lucas@2016/02/15 272 * For RX Aggregation 273 */ 274 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_USB_RX_AGGREGATION) 275 #define RTW_RX_AGGREGATION 276 #endif /* CONFIG_SDIO_HCI || CONFIG_USB_RX_AGGREGATION */ 277 278 #endif /* __DRV_CONF_H__ */ 279