1*4882a593Smuzhiyun /****************************************************************************** 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Copyright(c) 2007 - 2019 Realtek Corporation. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify it 6*4882a593Smuzhiyun * under the terms of version 2 of the GNU General Public License as 7*4882a593Smuzhiyun * published by the Free Software Foundation. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, but WITHOUT 10*4882a593Smuzhiyun * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12*4882a593Smuzhiyun * more details. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun *****************************************************************************/ 15*4882a593Smuzhiyun #ifndef __DRV_CONF_H__ 16*4882a593Smuzhiyun #define __DRV_CONF_H__ 17*4882a593Smuzhiyun #include "autoconf.h" 18*4882a593Smuzhiyun #include "hal_ic_cfg.h" 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #define CONFIG_RSSI_PRIORITY 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /* 23*4882a593Smuzhiyun * RTW_BUSY_DENY_SCAN control if scan would be denied by busy traffic. 24*4882a593Smuzhiyun * When this defined, BUSY_TRAFFIC_SCAN_DENY_PERIOD would be used to judge if 25*4882a593Smuzhiyun * scan request coming from scan UI. Scan request from scan UI would be 26*4882a593Smuzhiyun * exception and never be denied by busy traffic. 27*4882a593Smuzhiyun */ 28*4882a593Smuzhiyun #define RTW_BUSY_DENY_SCAN 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun #ifdef CONFIG_RTW_REPEATER_SON 31*4882a593Smuzhiyun #ifndef CONFIG_AP 32*4882a593Smuzhiyun #define CONFIG_AP 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun #ifndef CONFIG_CONCURRENT_MODE 35*4882a593Smuzhiyun #define CONFIG_CONCURRENT_MODE 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun #ifndef CONFIG_BR_EXT 38*4882a593Smuzhiyun #define CONFIG_BR_EXT 39*4882a593Smuzhiyun #endif 40*4882a593Smuzhiyun #ifndef CONFIG_RTW_REPEATER_SON_ID 41*4882a593Smuzhiyun #define CONFIG_RTW_REPEATER_SON_ID 0x02040608 42*4882a593Smuzhiyun #endif 43*4882a593Smuzhiyun //#define CONFIG_RTW_REPEATER_SON_ROOT 44*4882a593Smuzhiyun #ifndef CONFIG_RTW_REPEATER_SON_ROOT 45*4882a593Smuzhiyun #undef CONFIG_ROAMING_FLAG 46*4882a593Smuzhiyun #define CONFIG_ROAMING_FLAG 0x7 47*4882a593Smuzhiyun #endif 48*4882a593Smuzhiyun #undef CONFIG_POWER_SAVING 49*4882a593Smuzhiyun #endif 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #if defined(CONFIG_MCC_MODE) && (!defined(CONFIG_CONCURRENT_MODE)) 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun #error "Enable CONCURRENT_MODE before enable MCC MODE\n" 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun #endif 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun #if defined(CONFIG_MCC_MODE) && defined(CONFIG_BT_COEXIST) 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun #error "Disable BT COEXIST before enable MCC MODE\n" 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun #endif 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun #if defined(CONFIG_MCC_MODE) && defined(CONFIG_TDLS) 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun #error "Disable TDLS before enable MCC MODE\n" 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun #endif 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun #if defined(CONFIG_RTW_80211R) && !defined(CONFIG_LAYER2_ROAMING) 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun #error "Enable CONFIG_LAYER2_ROAMING before enable CONFIG_RTW_80211R\n" 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun #endif 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun #ifdef CONFIG_LAYER2_ROAMING 76*4882a593Smuzhiyun /*#define CONFIG_RTW_ROAM_QUICKSCAN */ /* active_roaming is required. i.e CONFIG_ROAMING_FLAG[bit2] MUST be enabled */ 77*4882a593Smuzhiyun /*#define CONFIG_RTW_ROAM_QUICKSCAN_TH 60*/ 78*4882a593Smuzhiyun #endif 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun /* Default enable single wiphy if driver ver >= 5.9 */ 81*4882a593Smuzhiyun #define RTW_SINGLE_WIPHY 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun #ifdef CONFIG_RTW_ANDROID 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun #include <linux/version.h> 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun #ifndef CONFIG_IOCTL_CFG80211 88*4882a593Smuzhiyun #define CONFIG_IOCTL_CFG80211 89*4882a593Smuzhiyun #endif 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun #ifndef RTW_USE_CFG80211_STA_EVENT 92*4882a593Smuzhiyun #define RTW_USE_CFG80211_STA_EVENT 93*4882a593Smuzhiyun #endif 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun #if (CONFIG_RTW_ANDROID > 4) 96*4882a593Smuzhiyun #ifndef CONFIG_RADIO_WORK 97*4882a593Smuzhiyun #define CONFIG_RADIO_WORK 98*4882a593Smuzhiyun #endif 99*4882a593Smuzhiyun #endif 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun #if (CONFIG_RTW_ANDROID <= 7) 102*4882a593Smuzhiyun #ifdef RTW_SINGLE_WIPHY 103*4882a593Smuzhiyun #undef RTW_SINGLE_WIPHY 104*4882a593Smuzhiyun #endif 105*4882a593Smuzhiyun #endif 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun #if (CONFIG_RTW_ANDROID >= 8) 108*4882a593Smuzhiyun #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)) 109*4882a593Smuzhiyun #ifndef CONFIG_RTW_WIFI_HAL 110*4882a593Smuzhiyun #define CONFIG_RTW_WIFI_HAL 111*4882a593Smuzhiyun #endif 112*4882a593Smuzhiyun #else 113*4882a593Smuzhiyun #error "Linux kernel version is too old\n" 114*4882a593Smuzhiyun #endif 115*4882a593Smuzhiyun #endif 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun #ifdef CONFIG_RTW_WIFI_HAL 118*4882a593Smuzhiyun #ifndef CONFIG_RTW_WIFI_HAL_DEBUG 119*4882a593Smuzhiyun //#define CONFIG_RTW_WIFI_HAL_DEBUG 120*4882a593Smuzhiyun #endif 121*4882a593Smuzhiyun #ifndef CONFIG_RTW_CFGVENDOR_LLSTATS 122*4882a593Smuzhiyun #define CONFIG_RTW_CFGVENDOR_LLSTATS 123*4882a593Smuzhiyun #endif 124*4882a593Smuzhiyun #if (CONFIG_RTW_ANDROID < 11) 125*4882a593Smuzhiyun #ifndef CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI 126*4882a593Smuzhiyun #define CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI 127*4882a593Smuzhiyun #endif 128*4882a593Smuzhiyun #else 129*4882a593Smuzhiyun #ifndef CONFIG_RTW_SCAN_RAND 130*4882a593Smuzhiyun #define CONFIG_RTW_SCAN_RAND 131*4882a593Smuzhiyun #endif 132*4882a593Smuzhiyun #endif 133*4882a593Smuzhiyun #ifndef CONFIG_RTW_CFGVENDOR_RSSIMONITOR 134*4882a593Smuzhiyun #define CONFIG_RTW_CFGVENDOR_RSSIMONITOR 135*4882a593Smuzhiyun #endif 136*4882a593Smuzhiyun #ifndef CONFIG_RTW_CFGVENDOR_WIFI_LOGGER 137*4882a593Smuzhiyun #define CONFIG_RTW_CFGVENDOR_WIFI_LOGGER 138*4882a593Smuzhiyun #endif 139*4882a593Smuzhiyun #if (CONFIG_RTW_ANDROID >= 10) 140*4882a593Smuzhiyun #ifndef CONFIG_RTW_CFGVENDOR_WIFI_OFFLOAD 141*4882a593Smuzhiyun //#define CONFIG_RTW_CFGVENDOR_WIFI_OFFLOAD 142*4882a593Smuzhiyun #endif 143*4882a593Smuzhiyun #ifndef CONFIG_RTW_HOSTAPD_ACS 144*4882a593Smuzhiyun #define CONFIG_RTW_HOSTAPD_ACS 145*4882a593Smuzhiyun #endif 146*4882a593Smuzhiyun #ifndef CONFIG_KERNEL_PATCH_EXTERNAL_AUTH 147*4882a593Smuzhiyun #define CONFIG_KERNEL_PATCH_EXTERNAL_AUTH 148*4882a593Smuzhiyun #endif 149*4882a593Smuzhiyun #ifndef CONFIG_RTW_ABORT_SCAN 150*4882a593Smuzhiyun #define CONFIG_RTW_ABORT_SCAN 151*4882a593Smuzhiyun #endif 152*4882a593Smuzhiyun #endif 153*4882a593Smuzhiyun #endif // CONFIG_RTW_WIFI_HAL 154*4882a593Smuzhiyun 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun /* Some Android build will restart the UI while non-printable ascii is passed 157*4882a593Smuzhiyun * between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID 158*4882a593Smuzhiyun * for Android here. If you are sure there is no risk on your system about this, 159*4882a593Smuzhiyun * mask this macro define to support non-printable ascii ssid. 160*4882a593Smuzhiyun * #define CONFIG_VALIDATE_SSID */ 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun /* Android expect dbm as the rx signal strength unit */ 163*4882a593Smuzhiyun #define CONFIG_SIGNAL_DISPLAY_DBM 164*4882a593Smuzhiyun #endif // CONFIG_RTW_ANDROID 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun /* 167*4882a593Smuzhiyun #if defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_RESUME_IN_WORKQUEUE) 168*4882a593Smuzhiyun #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 169*4882a593Smuzhiyun #undef CONFIG_RESUME_IN_WORKQUEUE 170*4882a593Smuzhiyun #endif 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun #if defined(CONFIG_ANDROID_POWER) && defined(CONFIG_RESUME_IN_WORKQUEUE) 173*4882a593Smuzhiyun #warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" 174*4882a593Smuzhiyun #undef CONFIG_RESUME_IN_WORKQUEUE 175*4882a593Smuzhiyun #endif 176*4882a593Smuzhiyun */ 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun #ifdef CONFIG_RESUME_IN_WORKQUEUE /* this can be removed, because there is no case for this... */ 179*4882a593Smuzhiyun #if !defined(CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER) 180*4882a593Smuzhiyun #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER will suffer from the danger of wifi's unfunctionality..." 181*4882a593Smuzhiyun #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..." 182*4882a593Smuzhiyun #endif 183*4882a593Smuzhiyun #endif 184*4882a593Smuzhiyun 185*4882a593Smuzhiyun /* About USB VENDOR REQ */ 186*4882a593Smuzhiyun #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 187*4882a593Smuzhiyun #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically" 188*4882a593Smuzhiyun #define CONFIG_USB_VENDOR_REQ_MUTEX 189*4882a593Smuzhiyun #endif 190*4882a593Smuzhiyun #if defined(CONFIG_VENDOR_REQ_RETRY) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) 191*4882a593Smuzhiyun #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically" 192*4882a593Smuzhiyun #define CONFIG_USB_VENDOR_REQ_MUTEX 193*4882a593Smuzhiyun #endif 194*4882a593Smuzhiyun 195*4882a593Smuzhiyun #ifdef CONFIG_WIFI_MONITOR 196*4882a593Smuzhiyun /* #define CONFIG_MONITOR_MODE_XMIT */ 197*4882a593Smuzhiyun #endif 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun #ifdef CONFIG_CUSTOMER_ALIBABA_GENERAL 200*4882a593Smuzhiyun #ifndef CONFIG_WIFI_MONITOR 201*4882a593Smuzhiyun #define CONFIG_WIFI_MONITOR 202*4882a593Smuzhiyun #endif 203*4882a593Smuzhiyun #ifdef CONFIG_POWER_SAVING 204*4882a593Smuzhiyun #undef CONFIG_POWER_SAVING 205*4882a593Smuzhiyun #endif 206*4882a593Smuzhiyun #endif 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun #ifdef CONFIG_CUSTOMER01_SMART_ANTENNA 209*4882a593Smuzhiyun #ifdef CONFIG_POWER_SAVING 210*4882a593Smuzhiyun #undef CONFIG_POWER_SAVING 211*4882a593Smuzhiyun #endif 212*4882a593Smuzhiyun #ifdef CONFIG_BEAMFORMING 213*4882a593Smuzhiyun #undef CONFIG_BEAMFORMING 214*4882a593Smuzhiyun #endif 215*4882a593Smuzhiyun #endif 216*4882a593Smuzhiyun 217*4882a593Smuzhiyun #ifndef CONFIG_RTW_DATA_BMC_TO_UC 218*4882a593Smuzhiyun #define CONFIG_RTW_DATA_BMC_TO_UC 0 219*4882a593Smuzhiyun #endif 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun #ifdef CONFIG_AP_MODE 222*4882a593Smuzhiyun #define CONFIG_LIMITED_AP_NUM 1 223*4882a593Smuzhiyun 224*4882a593Smuzhiyun #ifndef CONFIG_RTW_AP_DATA_BMC_TO_UC 225*4882a593Smuzhiyun #define CONFIG_RTW_AP_DATA_BMC_TO_UC 1 226*4882a593Smuzhiyun #endif 227*4882a593Smuzhiyun #if CONFIG_RTW_AP_DATA_BMC_TO_UC 228*4882a593Smuzhiyun #undef CONFIG_RTW_DATA_BMC_TO_UC 229*4882a593Smuzhiyun #define CONFIG_RTW_DATA_BMC_TO_UC 1 230*4882a593Smuzhiyun #endif 231*4882a593Smuzhiyun #ifndef CONFIG_RTW_AP_SRC_B2U_FLAGS 232*4882a593Smuzhiyun #define CONFIG_RTW_AP_SRC_B2U_FLAGS 0x8 /* see RTW_AP_B2U_XXX */ 233*4882a593Smuzhiyun #endif 234*4882a593Smuzhiyun #ifndef CONFIG_RTW_AP_FWD_B2U_FLAGS 235*4882a593Smuzhiyun #define CONFIG_RTW_AP_FWD_B2U_FLAGS 0x8 /* see RTW_AP_B2U_XXX */ 236*4882a593Smuzhiyun #endif 237*4882a593Smuzhiyun 238*4882a593Smuzhiyun #ifndef CONFIG_ACTIVE_TPC_REPORT 239*4882a593Smuzhiyun #define CONFIG_ACTIVE_TPC_REPORT 240*4882a593Smuzhiyun #endif 241*4882a593Smuzhiyun #endif 242*4882a593Smuzhiyun 243*4882a593Smuzhiyun #ifdef CONFIG_RTW_MULTI_AP 244*4882a593Smuzhiyun #ifndef CONFIG_AP_MODE 245*4882a593Smuzhiyun #error "enable CONFIG_RTW_MULTI_AP without CONFIG_AP_MODE" 246*4882a593Smuzhiyun #endif 247*4882a593Smuzhiyun #ifndef CONFIG_RTW_WDS 248*4882a593Smuzhiyun #define CONFIG_RTW_WDS 249*4882a593Smuzhiyun #endif 250*4882a593Smuzhiyun #ifndef CONFIG_RTW_UNASOC_STA_MODE_OF_STYPE 251*4882a593Smuzhiyun #define CONFIG_RTW_UNASOC_STA_MODE_OF_STYPE {2, 1} /* BMC:2 for all, NMY_UC:1 for interested target */ 252*4882a593Smuzhiyun #endif 253*4882a593Smuzhiyun #ifndef CONFIG_RTW_NLRTW 254*4882a593Smuzhiyun #define CONFIG_RTW_NLRTW 255*4882a593Smuzhiyun #endif 256*4882a593Smuzhiyun #ifndef CONFIG_RTW_WNM 257*4882a593Smuzhiyun #define CONFIG_RTW_WNM 258*4882a593Smuzhiyun #endif 259*4882a593Smuzhiyun #ifndef CONFIG_RTW_80211K 260*4882a593Smuzhiyun #define CONFIG_RTW_80211K 261*4882a593Smuzhiyun #endif 262*4882a593Smuzhiyun #endif 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun #ifdef CONFIG_RTW_MESH 265*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_ACNODE_PREVENT 266*4882a593Smuzhiyun #define CONFIG_RTW_MESH_ACNODE_PREVENT 1 267*4882a593Smuzhiyun #endif 268*4882a593Smuzhiyun 269*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_OFFCH_CAND 270*4882a593Smuzhiyun #define CONFIG_RTW_MESH_OFFCH_CAND 1 271*4882a593Smuzhiyun #endif 272*4882a593Smuzhiyun 273*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_PEER_BLACKLIST 274*4882a593Smuzhiyun #define CONFIG_RTW_MESH_PEER_BLACKLIST 1 275*4882a593Smuzhiyun #endif 276*4882a593Smuzhiyun 277*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST 278*4882a593Smuzhiyun #define CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST 1 279*4882a593Smuzhiyun #endif 280*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_CTO_MGATE_CARRIER 281*4882a593Smuzhiyun #define CONFIG_RTW_MESH_CTO_MGATE_CARRIER CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST 282*4882a593Smuzhiyun #endif 283*4882a593Smuzhiyun 284*4882a593Smuzhiyun #ifndef CONFIG_RTW_MPM_TX_IES_SYNC_BSS 285*4882a593Smuzhiyun #define CONFIG_RTW_MPM_TX_IES_SYNC_BSS 1 286*4882a593Smuzhiyun #endif 287*4882a593Smuzhiyun #if CONFIG_RTW_MPM_TX_IES_SYNC_BSS 288*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_AEK 289*4882a593Smuzhiyun #define CONFIG_RTW_MESH_AEK 290*4882a593Smuzhiyun #endif 291*4882a593Smuzhiyun #endif 292*4882a593Smuzhiyun 293*4882a593Smuzhiyun #ifndef CONFIG_RTW_MESH_DATA_BMC_TO_UC 294*4882a593Smuzhiyun #define CONFIG_RTW_MESH_DATA_BMC_TO_UC 1 295*4882a593Smuzhiyun #endif 296*4882a593Smuzhiyun #if CONFIG_RTW_MESH_DATA_BMC_TO_UC 297*4882a593Smuzhiyun #undef CONFIG_RTW_DATA_BMC_TO_UC 298*4882a593Smuzhiyun #define CONFIG_RTW_DATA_BMC_TO_UC 1 299*4882a593Smuzhiyun #endif 300*4882a593Smuzhiyun #ifndef CONFIG_RTW_MSRC_B2U_FLAGS 301*4882a593Smuzhiyun #define CONFIG_RTW_MSRC_B2U_FLAGS 0x0 /* see RTW_MESH_B2U_XXX */ 302*4882a593Smuzhiyun #endif 303*4882a593Smuzhiyun #ifndef CONFIG_RTW_MFWD_B2U_FLAGS 304*4882a593Smuzhiyun #define CONFIG_RTW_MFWD_B2U_FLAGS 0x2 /* see RTW_MESH_B2U_XXX */ 305*4882a593Smuzhiyun #endif 306*4882a593Smuzhiyun #endif 307*4882a593Smuzhiyun 308*4882a593Smuzhiyun #if !defined(CONFIG_SCAN_BACKOP) && defined(CONFIG_AP_MODE) 309*4882a593Smuzhiyun #define CONFIG_SCAN_BACKOP 310*4882a593Smuzhiyun #endif 311*4882a593Smuzhiyun 312*4882a593Smuzhiyun #define RTW_SCAN_SPARSE_MIRACAST 1 313*4882a593Smuzhiyun #define RTW_SCAN_SPARSE_BG 0 314*4882a593Smuzhiyun 315*4882a593Smuzhiyun #ifndef CONFIG_TX_AC_LIFETIME 316*4882a593Smuzhiyun #define CONFIG_TX_AC_LIFETIME 1 317*4882a593Smuzhiyun #endif 318*4882a593Smuzhiyun #ifndef CONFIG_TX_ACLT_FLAGS 319*4882a593Smuzhiyun #define CONFIG_TX_ACLT_FLAGS 0x00 320*4882a593Smuzhiyun #endif 321*4882a593Smuzhiyun #ifndef CONFIG_TX_ACLT_CONF_DEFAULT 322*4882a593Smuzhiyun #define CONFIG_TX_ACLT_CONF_DEFAULT {0x0, 1024 * 1000, 1024 * 1000} 323*4882a593Smuzhiyun #endif 324*4882a593Smuzhiyun #ifndef CONFIG_TX_ACLT_CONF_AP_M2U 325*4882a593Smuzhiyun #define CONFIG_TX_ACLT_CONF_AP_M2U {0xF, 256 * 1000, 256 * 1000} 326*4882a593Smuzhiyun #endif 327*4882a593Smuzhiyun #ifndef CONFIG_TX_ACLT_CONF_MESH 328*4882a593Smuzhiyun #define CONFIG_TX_ACLT_CONF_MESH {0xF, 256 * 1000, 256 * 1000} 329*4882a593Smuzhiyun #endif 330*4882a593Smuzhiyun 331*4882a593Smuzhiyun #ifndef CONFIG_RTW_HIQ_FILTER 332*4882a593Smuzhiyun #define CONFIG_RTW_HIQ_FILTER 1 333*4882a593Smuzhiyun #endif 334*4882a593Smuzhiyun 335*4882a593Smuzhiyun #ifndef CONFIG_RTW_ADAPTIVITY_EN 336*4882a593Smuzhiyun #define CONFIG_RTW_ADAPTIVITY_EN 0 337*4882a593Smuzhiyun #endif 338*4882a593Smuzhiyun 339*4882a593Smuzhiyun #ifndef CONFIG_RTW_ADAPTIVITY_MODE 340*4882a593Smuzhiyun #define CONFIG_RTW_ADAPTIVITY_MODE 0 341*4882a593Smuzhiyun #endif 342*4882a593Smuzhiyun 343*4882a593Smuzhiyun #ifndef CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 344*4882a593Smuzhiyun #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0 345*4882a593Smuzhiyun #endif 346*4882a593Smuzhiyun 347*4882a593Smuzhiyun #ifndef CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 348*4882a593Smuzhiyun #define CONFIG_RTW_ADAPTIVITY_TH_EDCCA_HL_DIFF 0 349*4882a593Smuzhiyun #endif 350*4882a593Smuzhiyun 351*4882a593Smuzhiyun #ifndef CONFIG_RTW_EXCL_CHS 352*4882a593Smuzhiyun #define CONFIG_RTW_EXCL_CHS {0} 353*4882a593Smuzhiyun #endif 354*4882a593Smuzhiyun 355*4882a593Smuzhiyun #ifndef CONFIG_IEEE80211_BAND_5GHZ 356*4882a593Smuzhiyun #if defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8821C) \ 357*4882a593Smuzhiyun || defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C) \ 358*4882a593Smuzhiyun || defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8814B) || defined(CONFIG_RTL8723F) 359*4882a593Smuzhiyun #define CONFIG_IEEE80211_BAND_5GHZ 1 360*4882a593Smuzhiyun #else 361*4882a593Smuzhiyun #define CONFIG_IEEE80211_BAND_5GHZ 0 362*4882a593Smuzhiyun #endif 363*4882a593Smuzhiyun #endif 364*4882a593Smuzhiyun 365*4882a593Smuzhiyun #ifndef CONFIG_DFS 366*4882a593Smuzhiyun #define CONFIG_DFS 1 367*4882a593Smuzhiyun #endif 368*4882a593Smuzhiyun 369*4882a593Smuzhiyun #if CONFIG_IEEE80211_BAND_5GHZ && CONFIG_DFS && defined(CONFIG_AP_MODE) 370*4882a593Smuzhiyun #if !defined(CONFIG_DFS_SLAVE_WITH_RADAR_DETECT) 371*4882a593Smuzhiyun #define CONFIG_DFS_SLAVE_WITH_RADAR_DETECT 0 372*4882a593Smuzhiyun #endif 373*4882a593Smuzhiyun #if !defined(CONFIG_DFS_MASTER) || CONFIG_DFS_SLAVE_WITH_RADAR_DETECT 374*4882a593Smuzhiyun #define CONFIG_DFS_MASTER 375*4882a593Smuzhiyun #endif 376*4882a593Smuzhiyun #if defined(CONFIG_DFS_MASTER) && !defined(CONFIG_RTW_DFS_REGION_DOMAIN) 377*4882a593Smuzhiyun #define CONFIG_RTW_DFS_REGION_DOMAIN 0 378*4882a593Smuzhiyun #endif 379*4882a593Smuzhiyun #else 380*4882a593Smuzhiyun #undef CONFIG_DFS_MASTER 381*4882a593Smuzhiyun #undef CONFIG_RTW_DFS_REGION_DOMAIN 382*4882a593Smuzhiyun #define CONFIG_RTW_DFS_REGION_DOMAIN 0 383*4882a593Smuzhiyun #undef CONFIG_DFS_SLAVE_WITH_RADAR_DETECT 384*4882a593Smuzhiyun #define CONFIG_DFS_SLAVE_WITH_RADAR_DETECT 0 385*4882a593Smuzhiyun #endif 386*4882a593Smuzhiyun 387*4882a593Smuzhiyun #ifndef CONFIG_TXPWR_BY_RATE_EN 388*4882a593Smuzhiyun #define CONFIG_TXPWR_BY_RATE_EN 2 /* by efuse */ 389*4882a593Smuzhiyun #endif 390*4882a593Smuzhiyun #ifndef CONFIG_TXPWR_LIMIT_EN 391*4882a593Smuzhiyun #define CONFIG_TXPWR_LIMIT_EN 2 /* by efuse */ 392*4882a593Smuzhiyun #endif 393*4882a593Smuzhiyun 394*4882a593Smuzhiyun #ifndef CONFIG_RTW_CHPLAN 395*4882a593Smuzhiyun #define CONFIG_RTW_CHPLAN 0xFF /* RTW_CHPLAN_UNSPECIFIED */ 396*4882a593Smuzhiyun #endif 397*4882a593Smuzhiyun 398*4882a593Smuzhiyun /* compatible with old fashion configuration */ 399*4882a593Smuzhiyun #if defined(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY) 400*4882a593Smuzhiyun #undef CONFIG_TXPWR_BY_RATE_EN 401*4882a593Smuzhiyun #undef CONFIG_TXPWR_LIMIT_EN 402*4882a593Smuzhiyun #define CONFIG_TXPWR_BY_RATE_EN 1 403*4882a593Smuzhiyun #define CONFIG_TXPWR_LIMIT_EN 1 404*4882a593Smuzhiyun #elif defined(CONFIG_CALIBRATE_TX_POWER_TO_MAX) 405*4882a593Smuzhiyun #undef CONFIG_TXPWR_BY_RATE_EN 406*4882a593Smuzhiyun #undef CONFIG_TXPWR_LIMIT_EN 407*4882a593Smuzhiyun #define CONFIG_TXPWR_BY_RATE_EN 1 408*4882a593Smuzhiyun #define CONFIG_TXPWR_LIMIT_EN 0 409*4882a593Smuzhiyun #endif 410*4882a593Smuzhiyun 411*4882a593Smuzhiyun #ifndef RTW_DEF_MODULE_REGULATORY_CERT 412*4882a593Smuzhiyun #define RTW_DEF_MODULE_REGULATORY_CERT 0 413*4882a593Smuzhiyun #endif 414*4882a593Smuzhiyun 415*4882a593Smuzhiyun #if RTW_DEF_MODULE_REGULATORY_CERT 416*4882a593Smuzhiyun #ifdef CONFIG_REGD_SRC_FROM_OS 417*4882a593Smuzhiyun #error "CONFIG_REGD_SRC_FROM_OS is not supported when enable RTW_DEF_MODULE_REGULATORY_CERT" 418*4882a593Smuzhiyun #endif 419*4882a593Smuzhiyun /* force enable TX power by rate and TX power limit */ 420*4882a593Smuzhiyun #undef CONFIG_TXPWR_BY_RATE_EN 421*4882a593Smuzhiyun #undef CONFIG_TXPWR_LIMIT_EN 422*4882a593Smuzhiyun #define CONFIG_TXPWR_BY_RATE_EN 1 423*4882a593Smuzhiyun #define CONFIG_TXPWR_LIMIT_EN 1 424*4882a593Smuzhiyun #endif 425*4882a593Smuzhiyun 426*4882a593Smuzhiyun #if !CONFIG_TXPWR_LIMIT && CONFIG_TXPWR_LIMIT_EN 427*4882a593Smuzhiyun #undef CONFIG_TXPWR_LIMIT 428*4882a593Smuzhiyun #define CONFIG_TXPWR_LIMIT 1 429*4882a593Smuzhiyun #endif 430*4882a593Smuzhiyun 431*4882a593Smuzhiyun #ifndef CONFIG_RTW_ACTIVE_TPC_REPORT 432*4882a593Smuzhiyun #define CONFIG_RTW_ACTIVE_TPC_REPORT 1 /* 0:incapable, 1:capable, 2:auto enable */ 433*4882a593Smuzhiyun #endif 434*4882a593Smuzhiyun 435*4882a593Smuzhiyun #ifndef CONFIG_RTW_REGD_SRC 436*4882a593Smuzhiyun #define CONFIG_RTW_REGD_SRC 1 /* 0:RTK_PRIV, 1:OS */ 437*4882a593Smuzhiyun #endif 438*4882a593Smuzhiyun 439*4882a593Smuzhiyun #define CONFIG_IOCTL_WEXT 440*4882a593Smuzhiyun 441*4882a593Smuzhiyun #ifdef CONFIG_RTW_IPCAM_APPLICATION 442*4882a593Smuzhiyun #undef CONFIG_TXPWR_BY_RATE_EN 443*4882a593Smuzhiyun #define CONFIG_TXPWR_BY_RATE_EN 1 444*4882a593Smuzhiyun #define CONFIG_RTW_CUSTOMIZE_BEEDCA 0x0000431C 445*4882a593Smuzhiyun #define CONFIG_RTW_CUSTOMIZE_BWMODE 0x00 446*4882a593Smuzhiyun #define CONFIG_RTW_CUSTOMIZE_RLSTA 0x30 447*4882a593Smuzhiyun #define CONFIG_CHECK_SPECIFIC_IE_CONTENT 448*4882a593Smuzhiyun #ifdef CONFIG_CUSTOMER_EZVIZ_CHIME2 449*4882a593Smuzhiyun #undef CONFIG_ACTIVE_KEEP_ALIVE_CHECK 450*4882a593Smuzhiyun #endif 451*4882a593Smuzhiyun #if defined(CONFIG_RTL8192E) || defined(CONFIG_RTL8192F) || defined(CONFIG_RTL8822B) 452*4882a593Smuzhiyun #define CONFIG_RTW_TX_NPATH_EN /* mutually incompatible with STBC_TX & Beamformer */ 453*4882a593Smuzhiyun #endif 454*4882a593Smuzhiyun #endif 455*4882a593Smuzhiyun /* #define CONFIG_RTW_TOKEN_BASED_XMIT */ 456*4882a593Smuzhiyun #ifdef CONFIG_RTW_TOKEN_BASED_XMIT 457*4882a593Smuzhiyun #define NR_TBTX_SLOT 4 458*4882a593Smuzhiyun #define NR_MAXSTA_INSLOT 5 459*4882a593Smuzhiyun #define TBTX_TX_DURATION 30 460*4882a593Smuzhiyun 461*4882a593Smuzhiyun #define MAX_TXPAUSE_DURATION (TBTX_TX_DURATION*NR_TBTX_SLOT) 462*4882a593Smuzhiyun #endif 463*4882a593Smuzhiyun 464*4882a593Smuzhiyun /*#define CONFIG_EXTEND_LOWRATE_TXOP */ 465*4882a593Smuzhiyun 466*4882a593Smuzhiyun #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_1SS 467*4882a593Smuzhiyun #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_1SS {0xFF, 0xFF, 0xFF, 0xFF} 468*4882a593Smuzhiyun #endif 469*4882a593Smuzhiyun #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_2SS 470*4882a593Smuzhiyun #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_2SS {0xFF, 0xFF, 0xFF, 0xFF} 471*4882a593Smuzhiyun #endif 472*4882a593Smuzhiyun #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_3SS 473*4882a593Smuzhiyun #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_3SS {0xFF, 0xFF, 0xFF, 0xFF} 474*4882a593Smuzhiyun #endif 475*4882a593Smuzhiyun #ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_4SS 476*4882a593Smuzhiyun #define CONFIG_RTW_RX_AMPDU_SZ_LIMIT_4SS {0xFF, 0xFF, 0xFF, 0xFF} 477*4882a593Smuzhiyun #endif 478*4882a593Smuzhiyun 479*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_A 480*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_2G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 481*4882a593Smuzhiyun #endif 482*4882a593Smuzhiyun 483*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_B 484*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_2G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 485*4882a593Smuzhiyun #endif 486*4882a593Smuzhiyun 487*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_C 488*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_2G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 489*4882a593Smuzhiyun #endif 490*4882a593Smuzhiyun 491*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_2G_D 492*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_2G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1} 493*4882a593Smuzhiyun #endif 494*4882a593Smuzhiyun 495*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_A 496*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_5G_A {-1, -1, -1, -1, -1, -1, -1, -1, -1} 497*4882a593Smuzhiyun #endif 498*4882a593Smuzhiyun 499*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_B 500*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_5G_B {-1, -1, -1, -1, -1, -1, -1, -1, -1} 501*4882a593Smuzhiyun #endif 502*4882a593Smuzhiyun 503*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_C 504*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_5G_C {-1, -1, -1, -1, -1, -1, -1, -1, -1} 505*4882a593Smuzhiyun #endif 506*4882a593Smuzhiyun 507*4882a593Smuzhiyun #ifndef CONFIG_RTW_TARGET_TX_PWR_5G_D 508*4882a593Smuzhiyun #define CONFIG_RTW_TARGET_TX_PWR_5G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1} 509*4882a593Smuzhiyun #endif 510*4882a593Smuzhiyun 511*4882a593Smuzhiyun #ifndef CONFIG_RTW_ANTENNA_GAIN 512*4882a593Smuzhiyun #define CONFIG_RTW_ANTENNA_GAIN 0x7FFF /* == UNSPECIFIED_MBM */ 513*4882a593Smuzhiyun #endif 514*4882a593Smuzhiyun 515*4882a593Smuzhiyun #ifndef CONFIG_RTW_AMPLIFIER_TYPE_2G 516*4882a593Smuzhiyun #define CONFIG_RTW_AMPLIFIER_TYPE_2G 0 517*4882a593Smuzhiyun #endif 518*4882a593Smuzhiyun 519*4882a593Smuzhiyun #ifndef CONFIG_RTW_AMPLIFIER_TYPE_5G 520*4882a593Smuzhiyun #define CONFIG_RTW_AMPLIFIER_TYPE_5G 0 521*4882a593Smuzhiyun #endif 522*4882a593Smuzhiyun 523*4882a593Smuzhiyun #ifndef CONFIG_RTW_RFE_TYPE 524*4882a593Smuzhiyun #define CONFIG_RTW_RFE_TYPE 64 525*4882a593Smuzhiyun #endif 526*4882a593Smuzhiyun 527*4882a593Smuzhiyun #ifndef CONFIG_RTW_GLNA_TYPE 528*4882a593Smuzhiyun #define CONFIG_RTW_GLNA_TYPE 0 529*4882a593Smuzhiyun #endif 530*4882a593Smuzhiyun 531*4882a593Smuzhiyun #ifndef CONFIG_RTW_PLL_REF_CLK_SEL 532*4882a593Smuzhiyun #define CONFIG_RTW_PLL_REF_CLK_SEL 0x0F 533*4882a593Smuzhiyun #endif 534*4882a593Smuzhiyun 535*4882a593Smuzhiyun #ifndef CONFIG_IFACE_NUMBER 536*4882a593Smuzhiyun #ifdef CONFIG_CONCURRENT_MODE 537*4882a593Smuzhiyun #define CONFIG_IFACE_NUMBER 2 538*4882a593Smuzhiyun #else 539*4882a593Smuzhiyun #define CONFIG_IFACE_NUMBER 1 540*4882a593Smuzhiyun #endif 541*4882a593Smuzhiyun #endif 542*4882a593Smuzhiyun 543*4882a593Smuzhiyun #ifndef CONFIG_CONCURRENT_MODE 544*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER > 1) 545*4882a593Smuzhiyun #error "CONFIG_IFACE_NUMBER over 1,but CONFIG_CONCURRENT_MODE not defined" 546*4882a593Smuzhiyun #endif 547*4882a593Smuzhiyun #endif 548*4882a593Smuzhiyun 549*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER == 0) 550*4882a593Smuzhiyun #error "CONFIG_IFACE_NUMBER cound not be 0 !!" 551*4882a593Smuzhiyun #endif 552*4882a593Smuzhiyun 553*4882a593Smuzhiyun #if defined(CONFIG_RTL8188E) || defined(CONFIG_RTL8192E) || defined(CONFIG_RTL8188F) || \ 554*4882a593Smuzhiyun defined(CONFIG_RTL8188GTV) || defined(CONFIG_RTL8192F) || \ 555*4882a593Smuzhiyun defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8710B) || \ 556*4882a593Smuzhiyun defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D) 557*4882a593Smuzhiyun #define CONFIG_HWMPCAP_GEN1 558*4882a593Smuzhiyun #elif defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822C) || \ 559*4882a593Smuzhiyun defined(CONFIG_RTL8723F) /*|| defined(CONFIG_RTL8814A)*/ 560*4882a593Smuzhiyun #define CONFIG_HWMPCAP_GEN2 561*4882a593Smuzhiyun #elif defined(CONFIG_RTL8814B) /*Address CAM - 128*/ 562*4882a593Smuzhiyun #define CONFIG_HWMPCAP_GEN3 563*4882a593Smuzhiyun #endif 564*4882a593Smuzhiyun 565*4882a593Smuzhiyun #if defined(CONFIG_HWMPCAP_GEN1) && (CONFIG_IFACE_NUMBER > 2) 566*4882a593Smuzhiyun #ifdef CONFIG_POWER_SAVING 567*4882a593Smuzhiyun /*#warning "Disable PS when CONFIG_IFACE_NUMBER > 2"*/ 568*4882a593Smuzhiyun #undef CONFIG_POWER_SAVING 569*4882a593Smuzhiyun #endif 570*4882a593Smuzhiyun 571*4882a593Smuzhiyun #ifdef CONFIG_WOWLAN 572*4882a593Smuzhiyun #error "This IC can't support MI and WoWLan at the same time" 573*4882a593Smuzhiyun #endif 574*4882a593Smuzhiyun #endif 575*4882a593Smuzhiyun 576*4882a593Smuzhiyun #if defined(CONFIG_HWMPCAP_GEN1) && (CONFIG_IFACE_NUMBER > 3) 577*4882a593Smuzhiyun #error " This IC can't support over 3 interfaces !!" 578*4882a593Smuzhiyun #endif 579*4882a593Smuzhiyun 580*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER > 4) 581*4882a593Smuzhiyun #error "Not support over 4 interfaces yet !!" 582*4882a593Smuzhiyun #endif 583*4882a593Smuzhiyun 584*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER > 8) /*IFACE_ID_MAX*/ 585*4882a593Smuzhiyun #error "HW count not support over 8 interfaces !!" 586*4882a593Smuzhiyun #endif 587*4882a593Smuzhiyun 588*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER > 2) 589*4882a593Smuzhiyun #ifndef CONFIG_HWMPCAP_GEN3 590*4882a593Smuzhiyun #define CONFIG_MI_WITH_MBSSID_CAM 591*4882a593Smuzhiyun #endif 592*4882a593Smuzhiyun 593*4882a593Smuzhiyun #ifdef CONFIG_MI_WITH_MBSSID_CAM 594*4882a593Smuzhiyun #define CONFIG_MBSSID_CAM 595*4882a593Smuzhiyun #if defined(CONFIG_RUNTIME_PORT_SWITCH) 596*4882a593Smuzhiyun #undef CONFIG_RUNTIME_PORT_SWITCH 597*4882a593Smuzhiyun #endif 598*4882a593Smuzhiyun #endif 599*4882a593Smuzhiyun 600*4882a593Smuzhiyun #ifdef CONFIG_AP_MODE 601*4882a593Smuzhiyun #undef CONFIG_LIMITED_AP_NUM 602*4882a593Smuzhiyun #define CONFIG_LIMITED_AP_NUM 2 603*4882a593Smuzhiyun 604*4882a593Smuzhiyun #define CONFIG_SUPPORT_MULTI_BCN 605*4882a593Smuzhiyun 606*4882a593Smuzhiyun #define CONFIG_SWTIMER_BASED_TXBCN 607*4882a593Smuzhiyun 608*4882a593Smuzhiyun #ifdef CONFIG_HWMPCAP_GEN2 /*CONFIG_RTL8822B/CONFIG_RTL8821C/CONFIG_RTL8822C*/ 609*4882a593Smuzhiyun #define CONFIG_FW_HANDLE_TXBCN 610*4882a593Smuzhiyun 611*4882a593Smuzhiyun #ifdef CONFIG_FW_HANDLE_TXBCN 612*4882a593Smuzhiyun #ifdef CONFIG_SWTIMER_BASED_TXBCN 613*4882a593Smuzhiyun #undef CONFIG_SWTIMER_BASED_TXBCN 614*4882a593Smuzhiyun #endif 615*4882a593Smuzhiyun #undef CONFIG_LIMITED_AP_NUM 616*4882a593Smuzhiyun #define CONFIG_LIMITED_AP_NUM 4 617*4882a593Smuzhiyun #endif 618*4882a593Smuzhiyun 619*4882a593Smuzhiyun #endif /*CONFIG_HWMPCAP_GEN2*/ 620*4882a593Smuzhiyun 621*4882a593Smuzhiyun #ifdef CONFIG_HWMPCAP_GEN3 622*4882a593Smuzhiyun #define CONFIG_PORT_BASED_TXBCN 623*4882a593Smuzhiyun #undef CONFIG_SUPPORT_MULTI_BCN 624*4882a593Smuzhiyun #undef CONFIG_SWTIMER_BASED_TXBCN 625*4882a593Smuzhiyun #undef CONFIG_LIMITED_AP_NUM 626*4882a593Smuzhiyun #define CONFIG_LIMITED_AP_NUM 4 627*4882a593Smuzhiyun #ifdef CONFIG_PCI_HCI 628*4882a593Smuzhiyun #define CONFIG_PORT_BASED_HIQ /* 8814BU doesn't support */ 629*4882a593Smuzhiyun #endif 630*4882a593Smuzhiyun #endif 631*4882a593Smuzhiyun #endif /*CONFIG_AP_MODE*/ 632*4882a593Smuzhiyun 633*4882a593Smuzhiyun #ifdef CONFIG_HWMPCAP_GEN2 /*CONFIG_RTL8822B/CONFIG_RTL8821C/CONFIG_RTL8822C*/ 634*4882a593Smuzhiyun #define CONFIG_CLIENT_PORT_CFG 635*4882a593Smuzhiyun #define CONFIG_NEW_NETDEV_HDL 636*4882a593Smuzhiyun #endif/*CONFIG_HWMPCAP_GEN2*/ 637*4882a593Smuzhiyun #endif/*(CONFIG_IFACE_NUMBER > 2)*/ 638*4882a593Smuzhiyun 639*4882a593Smuzhiyun #if defined(CONFIG_MI_UNIQUE_MACADDR_BIT) 640*4882a593Smuzhiyun #if !defined(CONFIG_MI_WITH_MBSSID_CAM) 641*4882a593Smuzhiyun #error "CONFIG_MI_UNIQUE_MACADDR_BIT should not be used without multiple interface !!" 642*4882a593Smuzhiyun #endif 643*4882a593Smuzhiyun #if (CONFIG_MI_UNIQUE_MACADDR_BIT < 24) || ( 47 < CONFIG_MI_UNIQUE_MACADDR_BIT) 644*4882a593Smuzhiyun #error "CONFIG_MI_UNIQUE_MACADDR_BIT should be the bit in NIC specific mac address(BIT[24:47] !!" 645*4882a593Smuzhiyun #endif 646*4882a593Smuzhiyun #endif 647*4882a593Smuzhiyun 648*4882a593Smuzhiyun #define MACID_NUM_SW_LIMIT 32 649*4882a593Smuzhiyun #define SEC_CAM_ENT_NUM_SW_LIMIT 32 650*4882a593Smuzhiyun 651*4882a593Smuzhiyun #ifdef SEC_DEFAULT_KEY_SEARCH 652*4882a593Smuzhiyun #if (CONFIG_IFACE_NUMBER >= 2) 653*4882a593Smuzhiyun #error "Default Key Search only work with only one interface case!" 654*4882a593Smuzhiyun #endif 655*4882a593Smuzhiyun #endif 656*4882a593Smuzhiyun 657*4882a593Smuzhiyun #if defined(CONFIG_WOWLAN) && (defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B)) 658*4882a593Smuzhiyun #define CONFIG_WOW_PATTERN_HW_CAM 659*4882a593Smuzhiyun #endif 660*4882a593Smuzhiyun 661*4882a593Smuzhiyun #ifndef CONFIG_TSF_UPDATE_PAUSE_FACTOR 662*4882a593Smuzhiyun #define CONFIG_TSF_UPDATE_PAUSE_FACTOR 200 663*4882a593Smuzhiyun #endif 664*4882a593Smuzhiyun 665*4882a593Smuzhiyun #ifndef CONFIG_TSF_UPDATE_RESTORE_FACTOR 666*4882a593Smuzhiyun #define CONFIG_TSF_UPDATE_RESTORE_FACTOR 5 667*4882a593Smuzhiyun #endif 668*4882a593Smuzhiyun 669*4882a593Smuzhiyun /* 670*4882a593Smuzhiyun Mark CONFIG_DEAUTH_BEFORE_CONNECT by Arvin 2015/07/20 671*4882a593Smuzhiyun If the failure of Wi-Fi connection is due to some irregular disconnection behavior (like unplug dongle, 672*4882a593Smuzhiyun power down etc.) in last time, we can unmark this flag to avoid some unpredictable response from AP. 673*4882a593Smuzhiyun */ 674*4882a593Smuzhiyun /*#define CONFIG_DEAUTH_BEFORE_CONNECT */ 675*4882a593Smuzhiyun 676*4882a593Smuzhiyun /*#define CONFIG_WEXT_DONT_JOIN_BYSSID */ 677*4882a593Smuzhiyun /* #include <rtl871x_byteorder.h> */ 678*4882a593Smuzhiyun 679*4882a593Smuzhiyun 680*4882a593Smuzhiyun /*#define CONFIG_DOSCAN_IN_BUSYTRAFFIC */ 681*4882a593Smuzhiyun /*#define CONFIG_PHDYM_FW_FIXRATE */ /* Another way to fix tx rate */ 682*4882a593Smuzhiyun 683*4882a593Smuzhiyun /*Don't release SDIO irq in suspend/resume procedure*/ 684*4882a593Smuzhiyun #define CONFIG_RTW_SDIO_KEEP_IRQ 0 685*4882a593Smuzhiyun 686*4882a593Smuzhiyun /* 687*4882a593Smuzhiyun * Add by Lucas@2016/02/15 688*4882a593Smuzhiyun * For RX Aggregation 689*4882a593Smuzhiyun */ 690*4882a593Smuzhiyun #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_USB_RX_AGGREGATION) 691*4882a593Smuzhiyun #define RTW_RX_AGGREGATION 692*4882a593Smuzhiyun #endif /* CONFIG_SDIO_HCI || CONFIG_USB_RX_AGGREGATION */ 693*4882a593Smuzhiyun 694*4882a593Smuzhiyun #ifdef CONFIG_RTW_HOSTAPD_ACS 695*4882a593Smuzhiyun #ifndef CONFIG_RTW_ACS 696*4882a593Smuzhiyun #define CONFIG_RTW_ACS 697*4882a593Smuzhiyun #endif 698*4882a593Smuzhiyun #endif 699*4882a593Smuzhiyun 700*4882a593Smuzhiyun #ifdef CONFIG_RTW_80211K 701*4882a593Smuzhiyun #ifndef CONFIG_RTW_ACS 702*4882a593Smuzhiyun #define CONFIG_RTW_ACS 703*4882a593Smuzhiyun #endif 704*4882a593Smuzhiyun #endif /*CONFIG_RTW_80211K*/ 705*4882a593Smuzhiyun 706*4882a593Smuzhiyun #ifdef DBG_CONFIG_ERROR_RESET 707*4882a593Smuzhiyun #ifndef CONFIG_IPS 708*4882a593Smuzhiyun #define CONFIG_IPS 709*4882a593Smuzhiyun #endif 710*4882a593Smuzhiyun #endif 711*4882a593Smuzhiyun 712*4882a593Smuzhiyun /* IPS */ 713*4882a593Smuzhiyun #ifndef RTW_IPS_MODE 714*4882a593Smuzhiyun #if defined(CONFIG_IPS) 715*4882a593Smuzhiyun #define RTW_IPS_MODE 1 716*4882a593Smuzhiyun #else 717*4882a593Smuzhiyun #define RTW_IPS_MODE 0 718*4882a593Smuzhiyun #endif 719*4882a593Smuzhiyun #endif /* !RTW_IPS_MODE */ 720*4882a593Smuzhiyun 721*4882a593Smuzhiyun #if (RTW_IPS_MODE > 1 || RTW_IPS_MODE < 0) 722*4882a593Smuzhiyun #error "The CONFIG_IPS_MODE value is wrong. Please follow HowTo_enable_the_power_saving_functionality.pdf.\n" 723*4882a593Smuzhiyun #endif 724*4882a593Smuzhiyun 725*4882a593Smuzhiyun /* LPS */ 726*4882a593Smuzhiyun #ifndef RTW_LPS_MODE 727*4882a593Smuzhiyun #if defined(CONFIG_LPS_PG) || defined(CONFIG_LPS_PG_DDMA) 728*4882a593Smuzhiyun #define RTW_LPS_MODE 3 729*4882a593Smuzhiyun #elif defined(CONFIG_LPS_LCLK) 730*4882a593Smuzhiyun #define RTW_LPS_MODE 2 731*4882a593Smuzhiyun #elif defined(CONFIG_LPS) 732*4882a593Smuzhiyun #define RTW_LPS_MODE 1 733*4882a593Smuzhiyun #else 734*4882a593Smuzhiyun #define RTW_LPS_MODE 0 735*4882a593Smuzhiyun #endif 736*4882a593Smuzhiyun #endif /* !RTW_LPS_MODE */ 737*4882a593Smuzhiyun 738*4882a593Smuzhiyun #if (RTW_LPS_MODE > 3 || RTW_LPS_MODE < 0) 739*4882a593Smuzhiyun #error "The CONFIG_LPS_MODE value is wrong. Please follow HowTo_enable_the_power_saving_functionality.pdf.\n" 740*4882a593Smuzhiyun #endif 741*4882a593Smuzhiyun 742*4882a593Smuzhiyun #ifndef RTW_LPS_1T1R 743*4882a593Smuzhiyun #define RTW_LPS_1T1R 0 744*4882a593Smuzhiyun #endif 745*4882a593Smuzhiyun 746*4882a593Smuzhiyun #ifndef RTW_WOW_LPS_1T1R 747*4882a593Smuzhiyun #define RTW_WOW_LPS_1T1R 0 748*4882a593Smuzhiyun #endif 749*4882a593Smuzhiyun 750*4882a593Smuzhiyun /* WOW LPS */ 751*4882a593Smuzhiyun #ifndef RTW_WOW_LPS_MODE 752*4882a593Smuzhiyun #if defined(CONFIG_LPS_PG) || defined(CONFIG_LPS_PG_DDMA) 753*4882a593Smuzhiyun #define RTW_WOW_LPS_MODE 3 754*4882a593Smuzhiyun #elif defined(CONFIG_LPS_LCLK) 755*4882a593Smuzhiyun #define RTW_WOW_LPS_MODE 2 756*4882a593Smuzhiyun #elif defined(CONFIG_LPS) 757*4882a593Smuzhiyun #define RTW_WOW_LPS_MODE 1 758*4882a593Smuzhiyun #else 759*4882a593Smuzhiyun #define RTW_WOW_LPS_MODE 0 760*4882a593Smuzhiyun #endif 761*4882a593Smuzhiyun #endif /* !RTW_WOW_LPS_MODE */ 762*4882a593Smuzhiyun 763*4882a593Smuzhiyun #if (RTW_WOW_LPS_MODE > 3 || RTW_WOW_LPS_MODE < 0) 764*4882a593Smuzhiyun #error "The RTW_WOW_LPS_MODE value is wrong. Please follow HowTo_enable_the_power_saving_functionality.pdf.\n" 765*4882a593Smuzhiyun #endif 766*4882a593Smuzhiyun 767*4882a593Smuzhiyun #ifdef RTW_REDUCE_SCAN_SWITCH_CH_TIME 768*4882a593Smuzhiyun #ifndef CONFIG_RTL8822B 769*4882a593Smuzhiyun #error "Only 8822B support RTW_REDUCE_SCAN_SWITCH_CH_TIME" 770*4882a593Smuzhiyun #endif 771*4882a593Smuzhiyun #ifndef RTW_CHANNEL_SWITCH_OFFLOAD 772*4882a593Smuzhiyun #define RTW_CHANNEL_SWITCH_OFFLOAD 773*4882a593Smuzhiyun #endif 774*4882a593Smuzhiyun #endif 775*4882a593Smuzhiyun 776*4882a593Smuzhiyun #ifdef CONFIG_WAR_OFFLOAD 777*4882a593Smuzhiyun #ifndef CONFIG_WOWLAN 778*4882a593Smuzhiyun #error "WAR OFFLOAD is part of WOWLAN" 779*4882a593Smuzhiyun #endif 780*4882a593Smuzhiyun #endif 781*4882a593Smuzhiyun 782*4882a593Smuzhiyun #if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6) 783*4882a593Smuzhiyun #ifndef CONFIG_WOWLAN 784*4882a593Smuzhiyun #error "mDNS OFFLOAD is part of WOWLAN" 785*4882a593Smuzhiyun #endif 786*4882a593Smuzhiyun #ifndef CONFIG_WAR_OFFLOAD 787*4882a593Smuzhiyun #define CONFIG_WAR_OFFLOAD 788*4882a593Smuzhiyun #endif 789*4882a593Smuzhiyun #endif 790*4882a593Smuzhiyun 791*4882a593Smuzhiyun #define CONFIG_RTW_TPT_MODE 792*4882a593Smuzhiyun 793*4882a593Smuzhiyun #ifdef CONFIG_PCI_BCN_POLLING 794*4882a593Smuzhiyun #define CONFIG_BCN_ICF 795*4882a593Smuzhiyun #endif 796*4882a593Smuzhiyun 797*4882a593Smuzhiyun #ifndef CONFIG_RTW_MGMT_QUEUE 798*4882a593Smuzhiyun #define CONFIG_RTW_MGMT_QUEUE 799*4882a593Smuzhiyun #endif 800*4882a593Smuzhiyun 801*4882a593Smuzhiyun #ifndef CONFIG_PCI_MSI 802*4882a593Smuzhiyun #define CONFIG_RTW_PCI_MSI_DISABLE 803*4882a593Smuzhiyun #endif 804*4882a593Smuzhiyun 805*4882a593Smuzhiyun #if defined(CONFIG_PCI_DYNAMIC_ASPM_L1_LATENCY) || \ 806*4882a593Smuzhiyun defined(CONFIG_PCI_DYNAMIC_ASPM_LINK_CTRL) 807*4882a593Smuzhiyun #define CONFIG_PCI_DYNAMIC_ASPM 808*4882a593Smuzhiyun #endif 809*4882a593Smuzhiyun 810*4882a593Smuzhiyun #if 0 811*4882a593Smuzhiyun /* Debug related compiler flags */ 812*4882a593Smuzhiyun #define DBG_THREAD_PID /* Add thread pid to debug message prefix */ 813*4882a593Smuzhiyun #define DBG_CPU_INFO /* Add CPU info to debug message prefix */ 814*4882a593Smuzhiyun #endif 815*4882a593Smuzhiyun 816*4882a593Smuzhiyun #ifndef RTW_AMSDU_MODE 817*4882a593Smuzhiyun #define RTW_AMSDU_MODE 0 /* 0:non-SPP, 1:spp mode, 2:All drop */ 818*4882a593Smuzhiyun #endif 819*4882a593Smuzhiyun 820*4882a593Smuzhiyun #endif /* __DRV_CONF_H__ */ 821