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