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