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