1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2017 Realtek Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of version 2 of the GNU General Public License as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 * 15 *****************************************************************************/ 16 /* 17 * Public General Config 18 */ 19 #define AUTOCONF_INCLUDED 20 21 #define RTL871X_MODULE_NAME "8723DS" 22 #define DRV_NAME "rtl8723ds" 23 24 #ifndef CONFIG_RTL8723D 25 #define CONFIG_RTL8723D 26 #endif 27 #define CONFIG_SDIO_HCI 28 29 #define PLATFORM_LINUX 30 31 32 /* 33 * Wi-Fi Functions Config 34 */ 35 #define CONFIG_80211N_HT 36 #define CONFIG_RECV_REORDERING_CTRL 37 38 /* #define CONFIG_IOCTL_CFG80211 */ /* Set from Makefile */ 39 #ifdef CONFIG_IOCTL_CFG80211 40 /* 41 * Indecate new sta asoc through cfg80211_new_sta 42 * If kernel version >= 3.2 or 43 * version < 3.2 but already apply cfg80211 patch, 44 * RTW_USE_CFG80211_STA_EVENT must be defiend! 45 */ 46 /* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */ 47 #ifndef CONFIG_PLATFORM_INTEL_BYT 48 #define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER 49 #endif /* !CONFIG_PLATFORM_INTEL_BYT */ 50 /* #define CONFIG_DEBUG_CFG80211 */ 51 #define CONFIG_SET_SCAN_DENY_TIMER 52 #endif 53 54 #define CONFIG_AP_MODE 55 #ifdef CONFIG_AP_MODE 56 #define CONFIG_NATIVEAP_MLME 57 #ifndef CONFIG_NATIVEAP_MLME 58 #define CONFIG_HOSTAPD_MLME 59 #endif 60 /* #define CONFIG_FIND_BEST_CHANNEL */ 61 #endif 62 63 #define CONFIG_P2P 64 #ifdef CONFIG_P2P 65 /* Added by Albert 20110812 66 The CONFIG_WFD is for supporting the Wi-Fi display */ 67 #define CONFIG_WFD 68 69 #define CONFIG_P2P_REMOVE_GROUP_INFO 70 71 /* #define CONFIG_DBG_P2P */ 72 #define CONFIG_P2P_PS 73 #define CONFIG_P2P_OP_CHK_SOCIAL_CH 74 #define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT /* replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */ 75 /*#define CONFIG_P2P_INVITE_IOT*/ 76 #endif 77 78 /* Added by Kurt 20110511 */ 79 #ifdef CONFIG_TDLS 80 #define CONFIG_TDLS_DRIVER_SETUP 81 /* #ifndef CONFIG_WFD 82 #define CONFIG_WFD 83 #endif */ 84 /* #define CONFIG_TDLS_AUTOSETUP */ 85 #define CONFIG_TDLS_AUTOCHECKALIVE 86 #define CONFIG_TDLS_CH_SW /* Enable "CONFIG_TDLS_CH_SW" by default, however limit it to only work in wifi logo test mode but not in normal mode currently */ 87 #endif 88 89 /* #define CONFIG_CONCURRENT_MODE */ /* Set from Makefile */ 90 #ifdef CONFIG_CONCURRENT_MODE 91 #define CONFIG_RUNTIME_PORT_SWITCH 92 #ifndef CONFIG_RUNTIME_PORT_SWITCH 93 #define CONFIG_TSF_RESET_OFFLOAD /* For 2 PORT TSF SYNC. */ 94 #endif 95 /* #define DBG_RUNTIME_PORT_SWITCH */ 96 #endif /* CONFIG_CONCURRENT_MODE */ 97 98 #define CONFIG_LAYER2_ROAMING 99 #define CONFIG_LAYER2_ROAMING_RESUME 100 101 /* 102 * Hareware/Firmware Related Config 103 */ 104 /* #define CONFIG_BT_COEXIST */ /* Set from Makefile */ 105 /* #define CONFIG_ANTENNA_DIVERSITY */ 106 /* #define SUPPORT_HW_RFOFF_DETECTED */ 107 108 /*#define CONFIG_RTW_LED*/ 109 #ifdef CONFIG_RTW_LED 110 /*#define CONFIG_RTW_SW_LED*/ 111 #endif /* CONFIG_RTW_LED */ 112 113 #define CONFIG_XMIT_ACK 114 #ifdef CONFIG_XMIT_ACK 115 #define CONFIG_ACTIVE_KEEP_ALIVE_CHECK 116 #endif 117 118 #define CONFIG_RF_POWER_TRIM 119 120 #define DISABLE_BB_RF 0 121 122 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ 123 124 125 /* 126 * Interface Related Config 127 */ 128 #define CONFIG_TX_AGGREGATION 129 #define CONFIG_SDIO_RX_COPY 130 #define CONFIG_XMIT_THREAD_MODE 131 /* #define RTW_XMIT_THREAD_HIGH_PRIORITY */ 132 /* #define RTW_XMIT_THREAD_HIGH_PRIORITY_AGG */ 133 /* #define CONFIG_SDIO_TX_ENABLE_AVAL_INT */ 134 /* #define SDIO_FREE_XMIT_BUF_SEMA */ 135 #define CONFIG_RECV_THREAD_MODE 136 #ifdef CONFIG_RECV_THREAD_MODE 137 #define RTW_RECV_THREAD_HIGH_PRIORITY 138 #endif/*CONFIG_RECV_THREAD_MODE*/ 139 140 /* 141 * Others 142 */ 143 /* #define CONFIG_MAC_LOOPBACK_DRIVER */ 144 145 #define CONFIG_SKB_COPY /* for amsdu */ 146 147 #define CONFIG_NEW_SIGNAL_STAT_PROCESS 148 149 #define CONFIG_EMBEDDED_FWIMG 150 151 #ifdef CONFIG_EMBEDDED_FWIMG 152 #define LOAD_FW_HEADER_FROM_DRIVER 153 #endif 154 /* #define CONFIG_FILE_FWIMG */ 155 /* download fw via tx packet or trafitional I/O*/ 156 /* #define CONFIG_DLFW_TXPKT */ 157 158 #define CONFIG_LONG_DELAY_ISSUE 159 /* #define CONFIG_PATCH_JOIN_WRONG_CHANNEL */ 160 161 162 /* 163 * Auto Config Section 164 */ 165 #ifdef CONFIG_MAC_LOOPBACK_DRIVER 166 #undef CONFIG_IOCTL_CFG80211 167 #undef CONFIG_AP_MODE 168 #undef CONFIG_NATIVEAP_MLME 169 #undef CONFIG_POWER_SAVING 170 #undef CONFIG_BT_COEXIST 171 #undef CONFIG_ANTENNA_DIVERSITY 172 #undef SUPPORT_HW_RFOFF_DETECTED 173 #endif 174 175 #ifdef CONFIG_MP_INCLUDED 176 #define MP_DRIVER 1 177 #define CONFIG_MP_IWPRIV_SUPPORT 178 /* disable unnecessary functions for MP */ 179 /* #undef CONFIG_POWER_SAVING 180 #undef CONFIG_BT_COEXIST 181 #undef CONFIG_ANTENNA_DIVERSITY 182 #undef SUPPORT_HW_RFOFF_DETECTED */ 183 #else /* !CONFIG_MP_INCLUDED */ 184 #define MP_DRIVER 0 185 #undef CONFIG_MP_IWPRIV_SUPPORT 186 #endif /* !CONFIG_MP_INCLUDED */ 187 188 #ifdef CONFIG_POWER_SAVING 189 #define CONFIG_IPS 190 #define CONFIG_LPS 191 192 #if defined(CONFIG_LPS) && (defined(CONFIG_GSPI_HCI) || defined(CONFIG_SDIO_HCI)) 193 #define CONFIG_LPS_LCLK 194 #endif 195 196 #ifdef CONFIG_LPS 197 #define CONFIG_CHECK_LEAVE_LPS 198 #ifndef CONFIG_PLATFORM_INTEL_BYT 199 #define CONFIG_LPS_SLOW_TRANSITION 200 #endif /* !CONFIG_PLATFORM_INTEL_BYT */ 201 #endif 202 203 #ifdef CONFIG_LPS_LCLK 204 #define CONFIG_DETECT_CPWM_BY_POLLING 205 #define CONFIG_LPS_RPWM_TIMER 206 #if defined(CONFIG_LPS_RPWM_TIMER) || defined(CONFIG_DETECT_CPWM_BY_POLLING) 207 #define LPS_RPWM_WAIT_MS 300 208 #endif 209 #define CONFIG_LPS_LCLK_WD_TIMER /* Watch Dog timer in LPS LCLK */ 210 #endif 211 212 #ifdef CONFIG_IPS 213 #define CONFIG_IPS_CHECK_IN_WD /* Do IPS Check in WatchDog. */ 214 /* #define CONFIG_SWLPS_IN_IPS */ /* Do SW LPS flow when entering and leaving IPS */ 215 /* #define CONFIG_FWLPS_IN_IPS */ /* issue H2C command to let FW do LPS when entering IPS */ 216 #endif 217 #endif /* CONFIG_POWER_SAVING */ 218 219 #ifdef CONFIG_BT_COEXIST 220 /* for ODM and outsrc BT-Coex */ 221 #ifndef CONFIG_LPS 222 #define CONFIG_LPS /* download reserved page to FW */ 223 #endif 224 #endif /* !CONFIG_BT_COEXIST */ 225 226 #ifdef CONFIG_WOWLAN 227 #define CONFIG_GTK_OL 228 /* #define CONFIG_ARP_KEEP_ALIVE */ 229 #endif /* CONFIG_WOWLAN */ 230 231 #ifdef CONFIG_GPIO_WAKEUP 232 #ifndef WAKEUP_GPIO_IDX 233 #define WAKEUP_GPIO_IDX 6 /* WIFI Chip Side */ 234 #endif /* !WAKEUP_GPIO_IDX */ 235 #endif /* CONFIG_GPIO_WAKEUP */ 236 237 #ifdef CONFIG_ANTENNA_DIVERSITY 238 #define CONFIG_HW_ANTENNA_DIVERSITY 239 #endif 240 241 #if (CONFIG_RTW_ADAPTIVITY_EN == 1) 242 #define CONFIG_RTW_ADAPTIVITY_TH_L2H_INI 0xf3 243 #endif 244 245 #ifdef CONFIG_RTW_NAPI 246 /*#define CONFIG_RTW_NAPI_DYNAMIC*/ 247 #define CONFIG_RTW_NAPI_V2 248 #endif 249 250 /* 251 * Platform dependent 252 */ 253 #ifdef CONFIG_PLATFORM_SPRD 254 255 #undef CONFIG_SDIO_RX_COPY 256 257 #ifdef ANDROID_2X 258 259 #define CONFIG_SDIO_RX_COPY 260 261 #else /* !ANDROID_2X */ 262 #undef CONFIG_WOWLAN 263 #undef CONFIG_WOWLAN_8723 264 /* #define CONFIG_SDIO_RX_COPY */ 265 /* #define CONFIG_LINKED_LCOK */ 266 #define CONFIG_AUTH_DIRECT_WITHOUT_BCN 267 /* #define CONFIG_DISCONNECT_H2CWAY */ 268 /* #define CONFIG_DONT_CARE_TP */ 269 #define CONFIG_LOW_PWR_LPS 270 /* #define CONFIG_CMCC_TEST */ 271 272 /* 1) LPS unit is only 102 ms, it's not 273 a good idear to retry it use timer, 274 2) we must wait ACK, or lots of IO 275 is not allowed under 32k, because 276 this will cause hw hang */ 277 #undef CONFIG_LPS_RPWM_TIMER 278 #define CONFIG_WAIT_PS_ACK 279 #define CONFIG_SOFTAP_11N 280 #define CONFIG_CHECK_BT_HANG 281 282 /* #define CONFIG_8703BS_TEST */ 283 #endif /* !ANDROID_2X */ 284 285 #endif /* CONFIG_PLATFORM_SPRD */ 286 287 288 /* 289 * Debug Related Config 290 */ 291 #define CONFIG_DEBUG 292 293 #ifdef CONFIG_DEBUG 294 #define DBG 1 /* for ODM & BTCOEX debug */ 295 #else /* !CONFIG_DEBUG */ 296 #define DBG 0 /* for ODM & BTCOEX debug */ 297 #endif /* !CONFIG_DEBUG */ 298 299 #define DBG_CONFIG_ERROR_DETECT 300 /* #define DBG_XMIT_BUF */ 301 /* #define DBG_XMIT_BUF_EXT */ 302 #define DBG_CHECK_FW_PS_STATE 303 /* #define DBG_CHECK_FW_PS_STATE_H2C */ 304 /* #define CONFIG_FW_C2H_DEBUG */ 305