1 /* 2 * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #ifndef __WLAN_TGT_DEF_CONFIG_H__ 21 #define __WLAN_TGT_DEF_CONFIG_H__ 22 23 /* 24 * TODO: please help to consider if we need a separate config file from LL case. 25 */ 26 27 /* 28 * set of default target config , that can be over written by platform 29 */ 30 31 #ifdef QCA_SUPPORT_INTEGRATED_SOC 32 #define CFG_TGT_NUM_VDEV 3 /*STA, P2P device, P2P GO/Cli*/ 33 #else 34 /* 35 * default limit of VAPs per device. 36 */ 37 #define CFG_TGT_NUM_VDEV 3 38 #endif 39 /* 40 * We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize 41 * hash collisions. 42 * TODO: This scaling factor would be taken care inside the WAL in the future. 43 */ 44 #define CFG_TGT_NUM_PEER_AST 2 45 46 /* # of WDS entries to support. 47 */ 48 #define CFG_TGT_WDS_ENTRIES 2 49 50 /* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B 51 */ 52 #define CFG_TGT_DEFAULT_DMA_BURST_SIZE 0 53 54 /* Fixed delimiters to be inserted after every MPDU 55 */ 56 #define CFG_TGT_DEFAULT_MAC_AGGR_DELIM 0 57 58 /* 59 * This value may need to be fine tuned, but a constant value will 60 * probably always be appropriate; it is probably not necessary to 61 * determine this value dynamically. 62 */ 63 #ifndef CFG_TGT_AST_SKID_LIMIT 64 #define CFG_TGT_AST_SKID_LIMIT 6 65 #endif 66 /* 67 * total number of peers per device. 68 * currently set to 8 to bring up IP3.9 for memory size problem 69 */ 70 #define CFG_TGT_NUM_PEERS 8 71 /* 72 * max number of peers per device. 73 */ 74 #define CFG_TGT_NUM_PEERS_MAX 8 75 /* 76 * In offload mode target supports features like WOW, chatter and other 77 * protocol offloads. In order to support them some functionalities like 78 * reorder buffering, PN checking need to be done in target. This determines 79 * maximum number of peers supported by target in offload mode 80 */ 81 #define CFG_TGT_NUM_OFFLOAD_PEERS 0 82 /* 83 * Number of reorder buffers used in offload mode 84 */ 85 #define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 0 86 /* 87 * keys per peer node 88 */ 89 #define CFG_TGT_NUM_PEER_KEYS 2 90 /* 91 * total number of TX/RX data TIDs 92 */ 93 #define CFG_TGT_NUM_TIDS (2 * (CFG_TGT_NUM_PEERS + \ 94 CFG_TGT_NUM_VDEV)) 95 /* 96 * max number of Tx TIDS 97 */ 98 #define CFG_TGT_NUM_TIDS_MAX (2 * (CFG_TGT_NUM_PEERS_MAX + \ 99 CFG_TGT_NUM_VDEV)) 100 /* 101 * number of multicast keys. 102 */ 103 #define CFG_TGT_NUM_MCAST_KEYS 8 104 /* 105 * A value of 3 would probably suffice - one for the control stack, one for 106 * the data stack, and one for debugging. 107 * This value may need to be fine tuned, but a constant value will 108 * probably always be appropriate; it is probably not necessary to 109 * determine this value dynamically. 110 */ 111 #define CFG_TGT_NUM_PDEV_HANDLERS 8 112 /* 113 * A value of 3 would probably suffice - one for the control stack, one for 114 * the data stack, and one for debugging. 115 * This value may need to be fine tuned, but a constant value will 116 * probably always be appropriate; it is probably not necessary to 117 * determine this value dynamically. 118 */ 119 #define CFG_TGT_NUM_VDEV_HANDLERS 4 120 /* 121 * set this to 8: 122 * one for WAL internals (connection pause) 123 * one for the control stack, 124 * one for the data stack 125 * and one for debugging 126 * This value may need to be fine tuned, but a constant value will 127 * probably always be appropriate; it is probably not necessary to 128 * determine this value dynamically. 129 */ 130 #define CFG_TGT_NUM_HANDLERS 14 131 /* 132 * set this to 3: one for the control stack, one for 133 * the data stack, and one for debugging. 134 * This value may need to be fine tuned, but a constant value will 135 * probably always be appropriate; it is probably not necessary to 136 * determine this value dynamically. 137 */ 138 #define CFG_TGT_NUM_PEER_HANDLERS 32 139 /* 140 * set this to 0x7 (Peregrine = 3 chains). 141 * need to be set dynamically based on the HW capability. 142 * this is rome 143 */ 144 #define CFG_TGT_DEFAULT_TX_CHAIN_MASK 0x3 145 /* 146 * set this to 0x7 (Peregrine = 3 chains). 147 * need to be set dynamically based on the HW capability. 148 * this is rome 149 */ 150 #define CFG_TGT_DEFAULT_RX_CHAIN_MASK 0x3 151 /* 100 ms for video, best-effort, and background */ 152 #define CFG_TGT_RX_TIMEOUT_LO_PRI 100 153 /* 40 ms for voice*/ 154 #define CFG_TGT_RX_TIMEOUT_HI_PRI 40 155 156 /* AR9888 unified is default in ethernet mode */ 157 #define CFG_TGT_RX_DECAP_MODE (0x2) 158 /* Decap to native Wifi header */ 159 #define CFG_TGT_RX_DECAP_MODE_NWIFI (0x1) 160 161 /* Decap to raw mode header */ 162 #define CFG_TGT_RX_DECAP_MODE_RAW (0x0) 163 164 /* maximum number of pending scan requests */ 165 #define CFG_TGT_DEFAULT_SCAN_MAX_REQS 0x4 166 167 /* maximum number of scan event handlers */ 168 #define CFG_TGT_DEFAULT_SCAN_MAX_HANDLERS 0x4 169 170 /* maximum number of VDEV that could use BMISS offload */ 171 #ifndef CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 172 #define CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 0x2 173 #endif 174 175 /* maximum number of VDEV offload Roaming to support */ 176 #ifndef CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 177 #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 0x2 178 #endif 179 180 /* maximum number of STA VDEVs */ 181 #ifndef CFG_TGT_DEFAULT_MAX_STA_VDEVS 182 #define CFG_TGT_DEFAULT_MAX_STA_VDEVS 0 183 #endif 184 185 /* maximum number of AP profiles pushed to offload Roaming */ 186 #define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_PROFILES 0x8 187 188 /* maximum number of VDEV offload GTK to support */ 189 #ifndef CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 190 #define CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 0x2 191 #endif 192 /* default: mcast->ucast disabled */ 193 194 #define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 0 195 #define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 0 196 #define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 0 /* disabled */ 197 198 /* 199 * Specify how much memory the target should allocate for a debug log of 200 * tx PPDU meta-information (how large the PPDU was, when it was sent, 201 * whether it was successful, etc.) 202 * The size of the log records is configurable, from a minimum of 28 bytes 203 * to a maximum of about 300 bytes. A typical configuration would result 204 * in each log record being about 124 bytes. 205 * Thus, 1KB of log space can hold about 30 small records, 3 large records, 206 * or about 8 typical-sized records. 207 */ 208 #define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */ 209 210 /* target based fragment timeout and MPDU duplicate detection */ 211 #define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0 212 /* Default VoW configuration 213 */ 214 #define CFG_TGT_DEFAULT_VOW_CONFIG 0 215 216 /* 217 * total number of descriptors to use in the target 218 */ 219 #ifndef CFG_TGT_NUM_MSDU_DESC 220 #define CFG_TGT_NUM_MSDU_DESC (32) 221 #endif 222 /* 223 * Maximum number of frag table entries 224 */ 225 #define CFG_TGT_MAX_FRAG_TABLE_ENTRIES 2 226 227 /* 228 * number of vdevs that can support tdls 229 */ 230 #define CFG_TGT_NUM_TDLS_VDEVS 1 231 232 /* 233 * number of peers that each Tdls vdev can track 234 */ 235 #ifndef CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 236 #define CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 8 237 #endif 238 /* 239 * number of TDLS concurrent sleep STAs 240 */ 241 #define CFG_TGT_NUM_TDLS_CONC_SLEEP_STAS 1 242 243 /* 244 * number of TDLS concurrent buffer STAs 245 */ 246 #define CFG_TGT_NUM_TDLS_CONC_BUFFER_STAS 1 247 248 #define CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES 16 249 250 /* 251 * Maximum number of VDEV that beacon tx offload will support 252 */ 253 #ifndef CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 254 /* For Naples/Rome/Tufello */ 255 #ifdef HIF_SDIO 256 #define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 2 257 #else 258 #define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 1 259 #endif 260 #endif /* CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV */ 261 262 /* 263 * ht enable highest MCS by default 264 */ 265 #define CFG_TGT_DEFAULT_GTX_HT_MASK 0x8080 266 /* 267 * vht enable highest MCS by default 268 */ 269 #define CFG_TGT_DEFAULT_GTX_VHT_MASK 0x80200 270 /* 271 * threshold to enable GTX 272 */ 273 #define CFG_TGT_DEFAULT_GTX_PER_THRESHOLD 3 274 /* 275 * margin to move back when per > margin + threshold 276 */ 277 #define CFG_TGT_DEFAULT_GTX_PER_MARGIN 2 278 /* 279 * step for every move 280 */ 281 #define CFG_TGT_DEFAULT_GTX_TPC_STEP 1 282 /* 283 * lowest TPC 284 */ 285 #define CFG_TGT_DEFAULT_GTX_TPC_MIN 0 286 /* 287 * enable all BW 20/40/80/160 288 */ 289 #define CFG_TGT_DEFAULT_GTX_BW_MASK 0xf 290 291 /* 292 * number of vdevs that can support OCB 293 */ 294 #define CFG_TGT_NUM_OCB_VDEVS 1 295 296 /* 297 * maximum number of channels that can do OCB 298 */ 299 #define CFG_TGT_NUM_OCB_CHANNELS 2 300 301 /* 302 * maximum number of channels in an OCB schedule 303 */ 304 #define CFG_TGT_NUM_OCB_SCHEDULES 2 305 306 /* 307 * Default TWT AP STA Count 308 */ 309 #define CFG_TGT_DEFAULT_TWT_AP_STA_COUNT 0 310 311 #endif /*__WLAN_TGT_DEF_CONFIG_H__ */ 312