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