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 //Older Android kernel doesn't has CONFIG_ANDROID defined, 32 //add this to force CONFIG_ANDROID defined 33 #ifdef CONFIG_PLATFORM_ANDROID 34 #ifndef CONFIG_ANDROID 35 #define CONFIG_ANDROID 36 #endif 37 #endif 38 39 #ifdef CONFIG_ANDROID 40 //Some Android build will restart the UI while non-printable ascii is passed 41 //between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID 42 //for Android here. If you are sure there is no risk on your system about this, 43 //mask this macro define to support non-printable ascii ssid. 44 //#define CONFIG_VALIDATE_SSID 45 46 //Android expect dbm as the rx signal strength unit 47 #define CONFIG_SIGNAL_DISPLAY_DBM 48 #endif 49 50 /* 51 #if defined(CONFIG_HAS_EARLYSUSPEND) && defined (CONFIG_RESUME_IN_WORKQUEUE) 52 #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 53 #undef CONFIG_RESUME_IN_WORKQUEUE 54 #endif 55 56 #if defined(CONFIG_ANDROID_POWER) && defined (CONFIG_RESUME_IN_WORKQUEUE) 57 #warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 58 #undef CONFIG_RESUME_IN_WORKQUEUE 59 #endif 60 */ 61 62 #ifdef CONFIG_RESUME_IN_WORKQUEUE //this can be removed, because there is no case for this... 63 #if !defined( CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER) 64 #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER will suffer from the danger of wifi's unfunctionality..." 65 #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..." 66 #endif 67 #endif 68 69 //About USB VENDOR REQ 70 #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 71 #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically" 72 #define CONFIG_USB_VENDOR_REQ_MUTEX 73 #endif 74 #if defined(CONFIG_VENDOR_REQ_RETRY) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 75 #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically" 76 #define CONFIG_USB_VENDOR_REQ_MUTEX 77 #endif 78 79 #if !defined(CONFIG_AP_MODE) && defined(CONFIG_DFS_MASTER) 80 #warning "undef CONFIG_DFS_MASTER because CONFIG_AP_MODE is not defined" 81 #undef CONFIG_DFS_MASTER 82 #endif 83 84 #define DYNAMIC_CAMID_ALLOC 85 86 #define RTW_SCAN_SPARSE_MIRACAST 1 87 #define RTW_SCAN_SPARSE_BG 0 88 89 #ifndef CONFIG_RTW_HIQ_FILTER 90 #define CONFIG_RTW_HIQ_FILTER 1 91 #endif 92 93 #ifndef CONFIG_RTW_ADAPTIVITY_EN 94 #define CONFIG_RTW_ADAPTIVITY_EN 0 95 #endif 96 97 #ifndef CONFIG_RTW_ADAPTIVITY_MODE 98 #define CONFIG_RTW_ADAPTIVITY_MODE 0 99 #endif 100 101 #ifndef CONFIG_RTW_ADAPTIVITY_DML 102 #define CONFIG_RTW_ADAPTIVITY_DML 0 103 #endif 104 105 #ifndef CONFIG_RTW_ADAPTIVITY_DC_BACKOFF 106 #define CONFIG_RTW_ADAPTIVITY_DC_BACKOFF 2 107 #endif 108 109 #ifndef CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 110 #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0 111 #endif 112 113 #ifndef CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 114 #define CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 0 115 #endif 116 117 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_A 118 #define CONFIG_RTW_TARGET_TX_PWR_2G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 119 #endif 120 121 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_B 122 #define CONFIG_RTW_TARGET_TX_PWR_2G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 123 #endif 124 125 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_C 126 #define CONFIG_RTW_TARGET_TX_PWR_2G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 127 #endif 128 129 #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_D 130 #define CONFIG_RTW_TARGET_TX_PWR_2G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 131 #endif 132 133 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_A 134 #define CONFIG_RTW_TARGET_TX_PWR_5G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1} 135 #endif 136 137 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_B 138 #define CONFIG_RTW_TARGET_TX_PWR_5G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1} 139 #endif 140 141 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_C 142 #define CONFIG_RTW_TARGET_TX_PWR_5G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1} 143 #endif 144 145 #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_D 146 #define CONFIG_RTW_TARGET_TX_PWR_5G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1} 147 #endif 148 149 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_2G 150 #define CONFIG_RTW_AMPLIFIER_TYPE_2G 0 151 #endif 152 153 #ifndef CONFIG_RTW_AMPLIFIER_TYPE_5G 154 #define CONFIG_RTW_AMPLIFIER_TYPE_5G 0 155 #endif 156 157 #ifndef CONFIG_RTW_RFE_TYPE 158 #define CONFIG_RTW_RFE_TYPE 64 159 #endif 160 161 #ifndef CONFIG_RTW_GLNA_TYPE 162 #define CONFIG_RTW_GLNA_TYPE 0 163 #endif 164 165 #ifndef CONFIG_RTW_PLL_REF_CLK_SEL 166 #define CONFIG_RTW_PLL_REF_CLK_SEL 0x0F 167 #endif 168 169 #define MACID_NUM_SW_LIMIT 32 170 #define SEC_CAM_ENT_NUM_SW_LIMIT 32 171 172 #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8814A) 173 #define CONFIG_IEEE80211_BAND_5GHZ 174 #endif 175 176 #ifndef RTW_DEF_MODULE_REGULATORY_CERT 177 #define RTW_DEF_MODULE_REGULATORY_CERT 0 178 #endif 179 180 #if RTW_DEF_MODULE_REGULATORY_CERT 181 /* force enable TX power by rate and TX power limit */ 182 #ifndef CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY 183 #define CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY 184 #endif 185 #endif 186 187 /* 188 Mark CONFIG_DEAUTH_BEFORE_CONNECT by Arvin 2015/07/20 189 If the failure of Wi-Fi connection is due to some irregular disconnection behavior (like unplug dongle, 190 power down etc.) in last time, we can unmark this flag to avoid some unpredictable response from AP. 191 */ 192 /*#define CONFIG_DEAUTH_BEFORE_CONNECT */ 193 194 /*#define CONFIG_WEXT_DONT_JOIN_BYSSID */ 195 //#include <rtl871x_byteorder.h> 196 197 198 /*#define CONFIG_DOSCAN_IN_BUSYTRAFFIC */ 199 200 #endif // __DRV_CONF_H__ 201 202