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