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 Configure 18 */ 19 #define AUTOCONF_INCLUDED 20 21 #define RTL871X_MODULE_NAME "8188FU" 22 #define DRV_NAME "rtl8188fu" 23 24 #ifndef CONFIG_RTL8188F 25 #define CONFIG_RTL8188F 26 #endif 27 #define CONFIG_USB_HCI 28 29 #define PLATFORM_LINUX 30 31 #define RTL8188F_USB_MAC_LOOPBACK 0 32 33 /* 34 * Wi-Fi Functions Configure 35 */ 36 #define CONFIG_80211N_HT 37 #define CONFIG_RECV_REORDERING_CTRL 38 39 /* #define CONFIG_IOCTL_CFG80211 */ /* Set from Makefile */ 40 #ifdef CONFIG_IOCTL_CFG80211 41 /* 42 * Indicate new sta asoc through cfg80211_new_sta 43 * If kernel version >= 3.2 or 44 * version < 3.2 but already apply cfg80211 patch, 45 * RTW_USE_CFG80211_STA_EVENT must be defined! 46 */ 47 /* #define RTW_USE_CFG80211_STA_EVENT */ /* Indicate new sta asoc through cfg80211_new_sta */ 48 #define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER 49 50 /* #define CONFIG_DEBUG_CFG80211 */ 51 /* #define CONFIG_DRV_ISSUE_PROV_REQ */ /* IOT FOR S2 */ 52 53 #define CONFIG_SET_SCAN_DENY_TIMER 54 #endif 55 56 #define CONFIG_AP_MODE 57 #ifdef CONFIG_AP_MODE 58 #define CONFIG_NATIVEAP_MLME 59 #ifndef CONFIG_NATIVEAP_MLME 60 #define CONFIG_HOSTAPD_MLME 61 #endif 62 /* #define CONFIG_FIND_BEST_CHANNEL */ 63 /* #define CONFIG_AUTO_AP_MODE */ 64 #endif 65 66 #define CONFIG_P2P 67 #ifdef CONFIG_P2P 68 /* 69 * Added by Albert 20110812 70 * The CONFIG_WFD is for supporting the Wi-Fi display 71 */ 72 #define CONFIG_WFD 73 74 #define CONFIG_P2P_REMOVE_GROUP_INFO 75 76 /* #define CONFIG_DBG_P2P */ 77 #define CONFIG_P2P_PS 78 #define CONFIG_P2P_OP_CHK_SOCIAL_CH 79 #define CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT /* replace CONFIG_P2P_CHK_INVITE_CH_LIST flag */ 80 /*#define CONFIG_P2P_INVITE_IOT*/ 81 #endif 82 83 /* 84 * Added by Kurt 20110511 85 */ 86 #ifdef CONFIG_TDLS 87 #define CONFIG_TDLS_DRIVER_SETUP 88 /* 89 #ifndef CONFIG_WFD 90 #define CONFIG_WFD 91 #endif 92 #define CONFIG_TDLS_AUTOSETUP 93 */ 94 #define CONFIG_TDLS_AUTOCHECKALIVE 95 #define CONFIG_TDLS_CH_SW /* Enable this flag only when we confirm that TDLS CH SW is supported in FW */ 96 #endif 97 98 /* #define CONFIG_CONCURRENT_MODE */ /* Set from Makefile */ 99 #ifdef CONFIG_CONCURRENT_MODE 100 #define CONFIG_TSF_RESET_OFFLOAD /* For 2 PORT TSF SYNC. */ 101 #define CONFIG_RUNTIME_PORT_SWITCH 102 103 /* #define DBG_RUNTIME_PORT_SWITCH */ 104 #endif /* CONFIG_CONCURRENT_MODE */ 105 106 #define CONFIG_LAYER2_ROAMING 107 #define CONFIG_LAYER2_ROAMING_RESUME 108 109 /* 110 * Hareware/Firmware Related Configure 111 */ 112 /* #define CONFIG_ANTENNA_DIVERSITY */ 113 /* #define SUPPORT_HW_RFOFF_DETECTED */ 114 115 #define CONFIG_RTW_LED 116 #ifdef CONFIG_RTW_LED 117 #define CONFIG_RTW_SW_LED 118 #ifdef CONFIG_RTW_SW_LED 119 /* define CONFIG_RTW_LED_HANDLED_BY_CMD_THREAD */ 120 #endif 121 #endif /* CONFIG_RTW_LED */ 122 123 #define CONFIG_XMIT_ACK 124 #ifdef CONFIG_XMIT_ACK 125 #define CONFIG_ACTIVE_KEEP_ALIVE_CHECK 126 #endif 127 128 #define CONFIG_RF_POWER_TRIM 129 130 #define DISABLE_BB_RF 0 131 132 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ 133 134 /* 135 * Interface Related Configure 136 */ 137 #define CONFIG_USB_TX_AGGREGATION 138 #define CONFIG_USB_RX_AGGREGATION 139 140 141 #define CONFIG_GLOBAL_UI_PID 142 143 #define CONFIG_OUT_EP_WIFI_MODE 144 145 #define ENABLE_USB_DROP_INCORRECT_OUT 146 147 /* #define CONFIG_SUPPORT_USB_INT */ 148 #ifdef CONFIG_SUPPORT_USB_INT 149 /* #define CONFIG_USB_INTERRUPT_IN_PIPE */ 150 #endif 151 152 /* #define CONFIG_REDUCE_USB_TX_INT */ /* Trade-off: Improve performance, but may cause TX URBs blocked by USB Host/Bus driver on few platforms. */ 153 154 /* 155 * CONFIG_USE_USB_BUFFER_ALLOC_XX uses Linux USB Buffer alloc API and is for Linux platform only now! 156 */ 157 /* #define CONFIG_USE_USB_BUFFER_ALLOC_TX */ /* Trade-off: For TX path, improve stability on some platforms, but may cause performance degrade on other platforms. */ 158 /* #define CONFIG_USE_USB_BUFFER_ALLOC_RX */ /* For RX path */ 159 160 /* 161 * USB VENDOR REQ BUFFER ALLOCATION METHOD 162 * if not set we'll use function local variable (stack memory) 163 */ 164 /* #define CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE */ 165 #define CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC 166 #define CONFIG_USB_VENDOR_REQ_MUTEX 167 #define CONFIG_VENDOR_REQ_RETRY 168 /* #define CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */ 169 170 171 /* 172 * Others 173 */ 174 #define CONFIG_SKB_COPY /* for amsdu */ 175 176 /* #define CONFIG_EASY_REPLACEMENT */ 177 178 /* #define CONFIG_ADAPTOR_INFO_CACHING_FILE */ /* now just applied on 8192cu only, should make it general... */ 179 180 /* #define CONFIG_RESUME_IN_WORKQUEUE */ 181 182 /* #define CONFIG_SET_SCAN_DENY_TIMER */ 183 184 #define CONFIG_NEW_SIGNAL_STAT_PROCESS 185 186 /* #define CONFIG_SIGNAL_DISPLAY_DBM */ /* display RX signal with dbm */ 187 #ifdef CONFIG_SIGNAL_DISPLAY_DBM 188 /* #define CONFIG_BACKGROUND_NOISE_MONITOR */ 189 #endif 190 191 #define CONFIG_EMBEDDED_FWIMG 192 193 #ifdef CONFIG_EMBEDDED_FWIMG 194 #define LOAD_FW_HEADER_FROM_DRIVER 195 #endif 196 /* #define CONFIG_FILE_FWIMG */ 197 198 #define CONFIG_LONG_DELAY_ISSUE 199 200 201 /* 202 * Auto Configure Section 203 */ 204 #ifdef CONFIG_MINIMAL_MEMORY_USAGE 205 #undef CONFIG_USB_TX_AGGREGATION 206 #undef CONFIG_USB_RX_AGGREGATION 207 #endif 208 209 #ifdef CONFIG_MP_INCLUDED 210 #define MP_DRIVER 1 211 #define CONFIG_MP_IWPRIV_SUPPORT 212 /* #undef CONFIG_USB_TX_AGGREGATION */ 213 /* #undef CONFIG_USB_RX_AGGREGATION */ 214 #else /* !CONFIG_MP_INCLUDED */ 215 #define MP_DRIVER 0 216 #endif /* !CONFIG_MP_INCLUDED */ 217 218 #ifdef CONFIG_POWER_SAVING 219 #define CONFIG_IPS 220 #define CONFIG_LPS 221 222 #ifdef CONFIG_IPS 223 /* #define CONFIG_IPS_LEVEL_2 1 */ /*enable this to set default IPS mode to IPS_LEVEL_2 */ 224 #endif 225 226 #if defined(CONFIG_LPS) 227 #define CONFIG_LPS_LCLK 228 #endif 229 230 #ifdef CONFIG_LPS_LCLK 231 /* #define CONFIG_XMIT_THREAD_MODE */ 232 #ifndef CONFIG_SUPPORT_USB_INT 233 #define LPS_RPWM_WAIT_MS 300 234 #define CONFIG_DETECT_CPWM_BY_POLLING 235 #endif 236 #endif 237 #endif /*CONFIG_POWER_SAVING*/ 238 239 #ifdef CONFIG_BT_COEXIST 240 /* for ODM and outsrc BT-Coex */ 241 #ifndef CONFIG_LPS 242 #define CONFIG_LPS /* download reserved page to FW */ 243 #endif 244 #endif /* CONFIG_BT_COEXIST */ 245 246 #ifdef CONFIG_WOWLAN 247 #define CONFIG_GTK_OL 248 #endif /* CONFIG_WOWLAN */ 249 250 #ifdef CONFIG_GPIO_WAKEUP 251 #ifndef WAKEUP_GPIO_IDX 252 #define WAKEUP_GPIO_IDX 0 /* WIFI Chip Side */ 253 #endif /* !WAKEUP_GPIO_IDX */ 254 #endif /* CONFIG_GPIO_WAKEUP */ 255 256 #ifdef CONFIG_AP_MODE 257 /* #define CONFIG_INTERRUPT_BASED_TXBCN */ /* Tx Beacon when driver BCN_OK ,BCN_ERR interrupt occurs */ 258 #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN) 259 #undef CONFIG_INTERRUPT_BASED_TXBCN 260 #endif 261 #ifdef CONFIG_INTERRUPT_BASED_TXBCN 262 /* #define CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */ 263 #define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR 264 #endif 265 #endif /* CONFIG_AP_MODE */ 266 267 #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX 268 269 #else 270 #define CONFIG_PREALLOC_RECV_SKB 271 #ifdef CONFIG_PREALLOC_RECV_SKB 272 /* #define CONFIG_FIX_NR_BULKIN_BUFFER */ /* only use PREALLOC_RECV_SKB buffer, don't alloc skb at runtime */ 273 #endif 274 #endif 275 276 #ifdef CONFIG_USB_TX_AGGREGATION 277 /* #define CONFIG_TX_EARLY_MODE */ 278 #endif 279 280 #ifdef CONFIG_TX_EARLY_MODE 281 #define RTL8188F_EARLY_MODE_PKT_NUM_10 0 282 #endif 283 284 285 286 287 /* 288 * Debug Related Configure 289 */ 290 #ifdef CONFIG_RTW_DEBUG 291 #define DBG 1 /* for ODM & BTCOEX debug */ 292 #define DBG_PHYDM_MORE 0 293 #else /* !CONFIG_RTW_DEBUG */ 294 #define DBG 0 /* for ODM & BTCOEX debug */ 295 #define DBG_PHYDM_MORE 0 296 #endif /* CONFIG_RTW_DEBUG */ 297 298 299 300 #define CONFIG_PROC_DEBUG 301 302 /* 303 #define DBG_CONFIG_ERROR_DETECT 304 #define DBG_CONFIG_ERROR_DETECT_INT 305 #define DBG_CONFIG_ERROR_RESET 306 307 #define DBG_IO 308 #define DBG_DELAY_OS 309 #define DBG_MEM_ALLOC 310 #define DBG_IOCTL 311 312 #define DBG_TX 313 #define DBG_XMIT_BUF 314 #define DBG_XMIT_BUF_EXT 315 #define DBG_TX_DROP_FRAME 316 317 #define DBG_RX_DROP_FRAME 318 #define DBG_RX_SEQ 319 #define DBG_RX_SIGNAL_DISPLAY_PROCESSING 320 #define DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED "rtw-ap" 321 322 #define DBG_SHOW_MCUFWDL_BEFORE_51_ENABLE 323 #define DBG_ROAMING_TEST 324 325 #define DBG_HAL_INIT_PROFILING 326 327 #define DBG_MEMORY_LEAK 328 */ 329 #define DBG_RX_DFRAME_RAW_DATA 330