1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021 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 #if defined(CONFIG_HL_SUPPORT) 21 #include "wlan_tgt_def_config_hl.h" 22 #else 23 #include "wlan_tgt_def_config.h" 24 #endif 25 26 #include "qdf_trace.h" 27 #include "qdf_mem.h" 28 #include <cdp_txrx_ops.h> 29 #include "wlan_cfg.h" 30 #include "cfg_ucfg_api.h" 31 #include "hal_api.h" 32 #include "dp_types.h" 33 #include <qdf_module.h> 34 35 /* 36 * The max allowed size for tx comp ring is 8191. 37 * This is limited by h/w ring max size. 38 * As this is not a power of 2 it does not work with nss offload so the 39 * nearest available size which is power of 2 is 4096 chosen for nss 40 */ 41 42 #define WLAN_CFG_TX_RING_MASK_0 BIT(0) 43 #define WLAN_CFG_TX_RING_MASK_1 BIT(1) 44 #define WLAN_CFG_TX_RING_MASK_2 BIT(2) 45 #define WLAN_CFG_TX_RING_MASK_3 BIT(3) 46 #define WLAN_CFG_TX_RING_MASK_4 BIT(4) 47 #define WLAN_CFG_TX_RING_MASK_5 BIT(5) 48 #define WLAN_CFG_TX_RING_MASK_6 BIT(6) 49 #define WLAN_CFG_TX_RING_MASK_7 BIT(7) 50 51 52 #define WLAN_CFG_RX_MON_RING_MASK_0 0x1 53 #define WLAN_CFG_RX_MON_RING_MASK_1 0x2 54 #define WLAN_CFG_RX_MON_RING_MASK_2 0x4 55 #define WLAN_CFG_RX_MON_RING_MASK_3 0x0 56 57 #define WLAN_CFG_TX_MON_RING_MASK_0 BIT(0) 58 #define WLAN_CFG_TX_MON_RING_MASK_1 BIT(1) 59 60 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 0x1 61 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 0x2 62 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2 0x4 63 64 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 0x1 65 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 0x2 66 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2 0x4 67 68 #define WLAN_CFG_RX_ERR_RING_MASK_0 0x1 69 #define WLAN_CFG_RX_ERR_RING_MASK_1 0x0 70 #define WLAN_CFG_RX_ERR_RING_MASK_2 0x0 71 #define WLAN_CFG_RX_ERR_RING_MASK_3 0x0 72 73 #define WLAN_CFG_RX_WBM_REL_RING_MASK_0 0x1 74 #define WLAN_CFG_RX_WBM_REL_RING_MASK_1 0x0 75 #define WLAN_CFG_RX_WBM_REL_RING_MASK_2 0x0 76 #define WLAN_CFG_RX_WBM_REL_RING_MASK_3 0x0 77 78 #define WLAN_CFG_REO_STATUS_RING_MASK_0 0x1 79 #define WLAN_CFG_REO_STATUS_RING_MASK_1 0x0 80 #define WLAN_CFG_REO_STATUS_RING_MASK_2 0x0 81 #define WLAN_CFG_REO_STATUS_RING_MASK_3 0x0 82 83 #define WLAN_CFG_RXDMA2HOST_RING_MASK_0 0x1 84 #define WLAN_CFG_RXDMA2HOST_RING_MASK_1 0x2 85 #define WLAN_CFG_RXDMA2HOST_RING_MASK_2 0x4 86 #define WLAN_CFG_RXDMA2HOST_RING_MASK_3 0x0 87 88 #define WLAN_CFG_HOST2RXDMA_RING_MASK_0 0x1 89 #define WLAN_CFG_HOST2RXDMA_RING_MASK_1 0x2 90 #define WLAN_CFG_HOST2RXDMA_RING_MASK_2 0x4 91 #define WLAN_CFG_HOST2RXDMA_RING_MASK_3 0x0 92 93 struct dp_int_mask_assignment { 94 uint8_t tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 95 uint8_t rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 96 uint8_t rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 97 uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 98 uint8_t host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 99 uint8_t rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 100 uint8_t host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 101 uint8_t rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 102 uint8_t rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 103 uint8_t rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 104 uint8_t reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 105 uint8_t rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 106 uint8_t rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 107 uint8_t tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 108 }; 109 110 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) 111 /* 112 * For BE, there are 18 available MSI interrupts, assigned in the manner 113 * below. 114 * TX(5) + RX(8) + (REO ERR + WBM ERR)(1) + 115 * (REO status + RXDMA[0] + RXDMA[1])(1) + NEAR_Full_RX(2) + NEAR_Full_TX(1) 116 * For IPA_OFFLOAD enabled case, 2 TX/RX rings would be assigned to IPA. 117 */ 118 119 #ifdef CONFIG_BERYLLIUM 120 #ifdef IPA_OFFLOAD 121 /* 122 * NEAR-FULL IRQ mask should be updated, if any change is made to 123 * the below TX mask. 124 */ 125 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 126 [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_6, 127 [2] = WLAN_CFG_TX_RING_MASK_7}; 128 #else 129 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 130 [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4, 131 [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_6, 132 [4] = WLAN_CFG_TX_RING_MASK_7}; 133 #endif /* IPA_OFFLOAD */ 134 135 static inline const 136 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 137 { 138 return &tx_ring_mask_msi[0]; 139 } 140 #else 141 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 142 [0] = WLAN_CFG_TX_RING_MASK_0}; 143 144 #ifdef TX_MULTI_TCL 145 static const uint8_t multi_tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 146 [0] = WLAN_CFG_TX_RING_MASK_0, [7] = WLAN_CFG_TX_RING_MASK_2, 147 [8] = WLAN_CFG_TX_RING_MASK_4}; 148 149 #ifdef IPA_OFFLOAD 150 static inline const 151 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 152 { 153 if (cfg_ctx->ipa_enabled) 154 return &tx_ring_mask_msi[0]; 155 156 return &multi_tx_ring_mask_msi[0]; 157 } 158 #else 159 static inline const 160 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 161 { 162 return &multi_tx_ring_mask_msi[0]; 163 } 164 #endif /* IPA_OFFLOAD */ 165 #else 166 static inline const 167 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 168 { 169 return &tx_ring_mask_msi[0]; 170 } 171 #endif /* TX_MULTI_TCL */ 172 #endif /* CONFIG_BERYLLIUM */ 173 174 #ifdef CONFIG_BERYLLIUM 175 #ifdef IPA_OFFLOAD 176 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 177 [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1, 178 [7] = WLAN_CFG_RX_RING_MASK_2, [9] = WLAN_CFG_RX_RING_MASK_4, 179 [10] = WLAN_CFG_RX_RING_MASK_5, [11] = WLAN_CFG_RX_RING_MASK_6}; 180 #else 181 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 182 [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1, 183 [7] = WLAN_CFG_RX_RING_MASK_2, [8] = WLAN_CFG_RX_RING_MASK_3, 184 [9] = WLAN_CFG_RX_RING_MASK_4, [10] = WLAN_CFG_RX_RING_MASK_5, 185 [11] = WLAN_CFG_RX_RING_MASK_6, [12] = WLAN_CFG_RX_RING_MASK_7}; 186 #endif /* IPA_OFFLOAD */ 187 #else /* !defined(CONFIG_BERYLLIUM) */ 188 #ifdef IPA_OFFLOAD 189 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 190 [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1, 191 [3] = WLAN_CFG_RX_RING_MASK_2}; 192 #else 193 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 194 [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1, 195 [3] = WLAN_CFG_RX_RING_MASK_2, [4] = WLAN_CFG_RX_RING_MASK_3}; 196 #endif 197 #endif /* CONFIG_BERYLLIUM */ 198 199 #ifdef CONFIG_BERYLLIUM 200 static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 201 [13] = WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 202 WLAN_CFG_RXDMA2HOST_RING_MASK_1}; 203 #else 204 static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 205 [5] = WLAN_CFG_RXDMA2HOST_RING_MASK_0, 206 [6] = WLAN_CFG_RXDMA2HOST_RING_MASK_1}; 207 #endif /* CONFIG_BERYLLIUM */ 208 209 static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 210 [1] = WLAN_CFG_RX_MON_RING_MASK_0, [2] = WLAN_CFG_RX_MON_RING_MASK_1}; 211 212 static const uint8_t host2rxdma_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 213 214 static const uint8_t host2rxdma_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 215 216 static const uint8_t rxdma2host_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 217 218 #ifdef CONFIG_BERYLLIUM 219 static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 220 [14] = WLAN_CFG_RX_ERR_RING_MASK_0}; 221 222 static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 223 [14] = WLAN_CFG_RX_WBM_REL_RING_MASK_0}; 224 225 static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 226 [13] = WLAN_CFG_REO_STATUS_RING_MASK_0}; 227 #else 228 static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 229 [6] = WLAN_CFG_RX_ERR_RING_MASK_0}; 230 static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 231 [6] = WLAN_CFG_RX_WBM_REL_RING_MASK_0}; 232 static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 233 [6] = WLAN_CFG_REO_STATUS_RING_MASK_0}; 234 #endif 235 236 #ifdef CONFIG_BERYLLIUM 237 #ifdef WLAN_FEATURE_NEAR_FULL_IRQ 238 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 239 [15] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1}; 240 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 241 [16] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1}; 242 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 243 [17] = WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK}; 244 #else 245 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 246 0 }; 247 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 248 0 }; 249 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 250 0 }; 251 #endif 252 #else 253 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 254 0 }; 255 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 256 0 }; 257 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 258 0 }; 259 #endif 260 261 #else 262 /* Integrated configuration + 8 possible MSI configurations */ 263 #define NUM_INTERRUPT_COMBINATIONS 9 264 /* 265 * This structure contains the best possible mask assignment for a given 266 * number of MSIs available in the system. 267 */ 268 #ifdef IPA_OFFLOAD 269 static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = { 270 /* Interrupt assignment for integrated configuration */ 271 { 272 /* tx ring masks */ 273 { WLAN_CFG_TX_RING_MASK_0, 274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 275 /* rx ring masks */ 276 { 0, 0, 0, 0, 0, 0, 0, 277 WLAN_CFG_RX_RING_MASK_0, 278 WLAN_CFG_RX_RING_MASK_1, 279 WLAN_CFG_RX_RING_MASK_2, 280 0}, 281 /* rx mon ring masks */ 282 { 0, 0, 0, 0, 283 WLAN_CFG_RX_MON_RING_MASK_0, 284 WLAN_CFG_RX_MON_RING_MASK_1, 285 WLAN_CFG_RX_MON_RING_MASK_2, 286 0, 0, 0, 0}, 287 /* host2rxdma ring masks */ 288 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 289 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 290 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 291 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 292 0, 0, 0, 0, 0, 0, 0}, 293 /* rxdma2host ring masks */ 294 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 295 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 296 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 297 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 298 0, 0, 0, 0, 0, 0, 0}, 299 /* host2rxdma mon ring masks */ 300 { 0, 0, 0, 0, 301 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 302 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 303 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 304 0, 0, 0, 0}, 305 /* rxdma2host mon ring masks */ 306 { 0, 0, 0, 0, 307 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 308 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 309 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 310 0, 0, 0, 0}, 311 /* rx err ring masks */ 312 { WLAN_CFG_RX_ERR_RING_MASK_0, 313 WLAN_CFG_RX_ERR_RING_MASK_1, 314 WLAN_CFG_RX_ERR_RING_MASK_2, 315 WLAN_CFG_RX_ERR_RING_MASK_3, 316 0, 0, 0, 0, 0, 0, 0}, 317 /* rx wbm rel ring masks */ 318 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 319 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 320 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 321 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 322 0, 0, 0, 0, 0, 0, 0}, 323 /* reo status ring masks */ 324 { WLAN_CFG_REO_STATUS_RING_MASK_0, 325 WLAN_CFG_REO_STATUS_RING_MASK_1, 326 WLAN_CFG_REO_STATUS_RING_MASK_2, 327 WLAN_CFG_REO_STATUS_RING_MASK_3, 328 0, 0, 0, 0, 0, 0, 0}, 329 }, 330 /* Interrupt assignment for 1 MSI combination */ 331 { 332 /* tx ring masks */ 333 { WLAN_CFG_TX_RING_MASK_0, 334 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 335 /* rx ring masks */ 336 { WLAN_CFG_RX_RING_MASK_0 | 337 WLAN_CFG_RX_RING_MASK_1 | 338 WLAN_CFG_RX_RING_MASK_2, 339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 340 /* rx mon ring masks */ 341 { WLAN_CFG_RX_MON_RING_MASK_0 | 342 WLAN_CFG_RX_MON_RING_MASK_1 | 343 WLAN_CFG_RX_MON_RING_MASK_2, 344 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 345 /* host2rxdma ring masks */ 346 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 347 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 348 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 349 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 351 /* rxdma2host ring masks */ 352 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 353 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 354 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 355 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 356 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 357 /* host2rxdma mon ring masks */ 358 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 359 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 360 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 362 /* rxdma2host mon ring masks */ 363 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 364 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 365 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 367 /* rx err ring masks */ 368 { WLAN_CFG_RX_ERR_RING_MASK_0 | 369 WLAN_CFG_RX_ERR_RING_MASK_1 | 370 WLAN_CFG_RX_ERR_RING_MASK_2 | 371 WLAN_CFG_RX_ERR_RING_MASK_3, 372 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 373 /* rx wbm rel ring masks */ 374 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 375 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 376 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 377 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 378 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 379 /* reo status ring masks */ 380 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 381 WLAN_CFG_REO_STATUS_RING_MASK_1 | 382 WLAN_CFG_REO_STATUS_RING_MASK_2 | 383 WLAN_CFG_REO_STATUS_RING_MASK_3, 384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 385 }, 386 /* Interrupt assignment for 2 MSI combination */ 387 { 388 /* tx ring masks */ 389 { WLAN_CFG_TX_RING_MASK_0, 390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 391 /* rx ring masks */ 392 { WLAN_CFG_RX_RING_MASK_0 | 393 WLAN_CFG_RX_RING_MASK_1, 394 WLAN_CFG_RX_RING_MASK_2, 395 0, 0, 0, 0, 0, 0, 0, 0, 0}, 396 /* rx mon ring masks */ 397 { WLAN_CFG_RX_MON_RING_MASK_0 | 398 WLAN_CFG_RX_MON_RING_MASK_1, 399 WLAN_CFG_RX_MON_RING_MASK_2, 400 0, 0, 0, 0, 0, 0, 0, 0, 0}, 401 /* host2rxdma ring masks */ 402 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 403 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 404 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 405 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 406 0, 0, 0, 0, 0, 0, 0, 0, 0}, 407 /* rxdma2host ring masks */ 408 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 409 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 410 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 411 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 412 0, 0, 0, 0, 0, 0, 0, 0, 0}, 413 /* host2rxdma mon ring masks */ 414 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 415 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 416 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 417 0, 0, 0, 0, 0, 0, 0, 0, 0}, 418 /* rxdma2host mon ring masks */ 419 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 420 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 421 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 422 0, 0, 0, 0, 0, 0, 0, 0, 0}, 423 /* rx err ring masks */ 424 { WLAN_CFG_RX_ERR_RING_MASK_0 | 425 WLAN_CFG_RX_ERR_RING_MASK_1, 426 WLAN_CFG_RX_ERR_RING_MASK_2 | 427 WLAN_CFG_RX_ERR_RING_MASK_3, 428 0, 0, 0, 0, 0, 0, 0, 0, 0}, 429 /* rx wbm rel ring masks */ 430 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 431 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 432 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 433 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 434 0, 0, 0, 0, 0, 0, 0, 0, 0}, 435 /* reo status ring masks */ 436 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 437 WLAN_CFG_REO_STATUS_RING_MASK_1, 438 WLAN_CFG_REO_STATUS_RING_MASK_2 | 439 WLAN_CFG_REO_STATUS_RING_MASK_3, 440 0, 0, 0, 0, 0, 0, 0, 0, 0}, 441 }, 442 /* Interrupt assignment for 3 MSI combination */ 443 { 444 /* tx ring masks */ 445 { WLAN_CFG_TX_RING_MASK_0, 446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 447 /* rx ring masks */ 448 { WLAN_CFG_RX_RING_MASK_0, 449 WLAN_CFG_RX_RING_MASK_1, 450 WLAN_CFG_RX_RING_MASK_2, 451 0, 0, 0, 0, 0, 0, 0, 0}, 452 /* rx mon ring masks */ 453 { 0, 0, 454 WLAN_CFG_RX_MON_RING_MASK_0 | 455 WLAN_CFG_RX_MON_RING_MASK_1 | 456 WLAN_CFG_RX_MON_RING_MASK_2, 457 0, 0, 0, 0, 0, 0, 0, 0}, 458 /* host2rxdma ring masks */ 459 { 0, 0, 460 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 461 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 462 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 463 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 464 0, 0, 0, 0, 0, 0, 0, 0}, 465 /* rxdma2host ring masks */ 466 { 0, 0, 467 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 468 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 469 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 470 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 471 0, 0, 0, 0, 0, 0, 0, 0}, 472 /* host2rxdma mon ring masks */ 473 { 0, 0, 474 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 475 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 476 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 477 0, 0, 0, 0, 0, 0, 0, 0}, 478 /* rxdma2host mon ring masks */ 479 { 0, 0, 480 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 481 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 482 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 483 0, 0, 0, 0, 0, 0, 0, 0}, 484 /* rx err ring masks */ 485 { 0, 0, 486 WLAN_CFG_RX_ERR_RING_MASK_0 | 487 WLAN_CFG_RX_ERR_RING_MASK_1 | 488 WLAN_CFG_RX_ERR_RING_MASK_2 | 489 WLAN_CFG_RX_ERR_RING_MASK_3, 490 0, 0, 0, 0, 0, 0, 0, 0}, 491 /* rx wbm rel ring masks */ 492 { 0, 0, 493 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 494 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 495 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 496 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 497 0, 0, 0, 0, 0, 0, 0, 0}, 498 /* reo status ring masks */ 499 { 0, 0, 500 WLAN_CFG_REO_STATUS_RING_MASK_0 | 501 WLAN_CFG_REO_STATUS_RING_MASK_1 | 502 WLAN_CFG_REO_STATUS_RING_MASK_2 | 503 WLAN_CFG_REO_STATUS_RING_MASK_3, 504 0, 0, 0, 0, 0, 0, 0, 0}, 505 }, 506 /* Interrupt assignment for 4 MSI combination */ 507 { 508 /* tx ring masks */ 509 { WLAN_CFG_TX_RING_MASK_0, 510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 511 /* rx ring masks */ 512 { WLAN_CFG_RX_RING_MASK_0, 513 WLAN_CFG_RX_RING_MASK_1, 514 WLAN_CFG_RX_RING_MASK_2, 515 0, 0, 0, 0, 0, 0, 0, 0}, 516 /* rx mon ring masks */ 517 { WLAN_CFG_RX_MON_RING_MASK_0, 518 WLAN_CFG_RX_MON_RING_MASK_1, 519 WLAN_CFG_RX_MON_RING_MASK_2, 520 0, 0, 0, 0, 0, 0, 0, 0}, 521 /* host2rxdma ring masks */ 522 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 523 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 524 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 525 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 526 0, 0, 0, 0, 0, 0, 0}, 527 /* rxdma2host ring masks */ 528 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 529 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 530 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 531 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 532 0, 0, 0, 0, 0, 0, 0}, 533 /* host2rxdma mon ring masks */ 534 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 535 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 536 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 537 0, 0, 0, 0, 0, 0, 0, 0}, 538 /* rxdma2host mon ring masks */ 539 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 540 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 541 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 542 0, 0, 0, 0, 0, 0, 0, 0}, 543 /* rx err ring masks */ 544 { WLAN_CFG_RX_ERR_RING_MASK_0, 545 WLAN_CFG_RX_ERR_RING_MASK_1, 546 WLAN_CFG_RX_ERR_RING_MASK_2, 547 WLAN_CFG_RX_ERR_RING_MASK_3, 548 0, 0, 0, 0, 0, 0, 0}, 549 /* rx wbm rel ring masks */ 550 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 551 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 552 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 553 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 554 0, 0, 0, 0, 0, 0, 0}, 555 /* reo status ring masks */ 556 { WLAN_CFG_REO_STATUS_RING_MASK_0, 557 WLAN_CFG_REO_STATUS_RING_MASK_1, 558 WLAN_CFG_REO_STATUS_RING_MASK_2, 559 WLAN_CFG_REO_STATUS_RING_MASK_3, 560 0, 0, 0, 0, 0, 0, 0}, 561 }, 562 /* Interrupt assignment for 5 MSI combination */ 563 { 564 /* tx ring masks */ 565 { WLAN_CFG_TX_RING_MASK_0, 566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 567 /* rx ring masks */ 568 { WLAN_CFG_RX_RING_MASK_0, 569 WLAN_CFG_RX_RING_MASK_1, 570 WLAN_CFG_RX_RING_MASK_2, 571 0, 0, 0, 0, 0, 0, 0, 0}, 572 /* rx mon ring masks */ 573 { 0, 0, 0, 0, 574 WLAN_CFG_RX_MON_RING_MASK_0 | 575 WLAN_CFG_RX_MON_RING_MASK_1 | 576 WLAN_CFG_RX_MON_RING_MASK_2, 577 0, 0, 0, 0, 0, 0}, 578 /* host2rxdma ring masks */ 579 { 0, 0, 0, 0, 580 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 581 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 582 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 583 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 584 0, 0, 0, 0, 0, 0}, 585 /* rxdma2host ring masks */ 586 { 0, 0, 0, 0, 587 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 588 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 589 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 590 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 591 0, 0, 0, 0, 0, 0}, 592 /* host2rxdma mon ring masks */ 593 { 0, 0, 0, 0, 594 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 595 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 596 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 597 0, 0, 0, 0, 0, 0}, 598 /* rxdma2host mon ring masks */ 599 { 0, 0, 0, 0, 600 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 601 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 602 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 603 0, 0, 0, 0, 0, 0}, 604 /* rx err ring masks */ 605 { 0, 0, 0, 0, 606 WLAN_CFG_RX_ERR_RING_MASK_0 | 607 WLAN_CFG_RX_ERR_RING_MASK_1 | 608 WLAN_CFG_RX_ERR_RING_MASK_2 | 609 WLAN_CFG_RX_ERR_RING_MASK_3, 610 0, 0, 0, 0, 0, 0}, 611 /* rx wbm rel ring masks */ 612 { 0, 0, 0, 0, 613 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 614 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 615 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 616 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 617 0, 0, 0, 0, 0, 0}, 618 /* reo status ring masks */ 619 { 0, 0, 0, 0, 620 WLAN_CFG_REO_STATUS_RING_MASK_0 | 621 WLAN_CFG_REO_STATUS_RING_MASK_1 | 622 WLAN_CFG_REO_STATUS_RING_MASK_2 | 623 WLAN_CFG_REO_STATUS_RING_MASK_3, 624 0, 0, 0, 0, 0, 0}, 625 }, 626 /* Interrupt assignment for 6 MSI combination */ 627 { 628 /* tx ring masks */ 629 { WLAN_CFG_TX_RING_MASK_0, 630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 631 /* rx ring masks */ 632 { 0, 0, 633 WLAN_CFG_RX_RING_MASK_0, 634 WLAN_CFG_RX_RING_MASK_1, 635 WLAN_CFG_RX_RING_MASK_2, 636 0, 0, 0, 0, 0, 0}, 637 /* rx mon ring masks */ 638 { WLAN_CFG_RX_MON_RING_MASK_0, 639 WLAN_CFG_RX_MON_RING_MASK_1, 640 WLAN_CFG_RX_MON_RING_MASK_2, 641 0, 0, 0, 0, 0, 0, 0, 0}, 642 /* host2rxdma ring masks */ 643 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 644 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 645 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 646 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 647 0, 0, 0, 0, 0, 0, 0}, 648 /* rxdma2host ring masks */ 649 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 650 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 651 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 652 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 653 0, 0, 0, 0, 0, 0, 0}, 654 /* host2rxdma mon ring masks */ 655 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 656 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 657 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 658 0, 0, 0, 0, 0, 0, 0, 0}, 659 /* rxdma2host mon ring masks */ 660 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 661 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 662 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 663 0, 0, 0, 0, 0, 0, 0, 0}, 664 /* rx err ring masks */ 665 { WLAN_CFG_RX_ERR_RING_MASK_0, 666 WLAN_CFG_RX_ERR_RING_MASK_1, 667 WLAN_CFG_RX_ERR_RING_MASK_2, 668 WLAN_CFG_RX_ERR_RING_MASK_3, 669 0, 0, 0, 0, 0, 0, 0}, 670 /* rx wbm rel ring masks */ 671 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 672 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 673 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 674 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 675 0, 0, 0, 0, 0, 0, 0}, 676 /* reo status ring masks */ 677 { WLAN_CFG_REO_STATUS_RING_MASK_0, 678 WLAN_CFG_REO_STATUS_RING_MASK_1, 679 WLAN_CFG_REO_STATUS_RING_MASK_2, 680 WLAN_CFG_REO_STATUS_RING_MASK_3, 681 0, 0, 0, 0, 0, 0, 0}, 682 }, 683 /* Interrupt assignment for 7 MSI combination */ 684 { 685 /* tx ring masks */ 686 { WLAN_CFG_TX_RING_MASK_0, 687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 688 /* rx ring masks */ 689 { 0, 0, 0, 690 WLAN_CFG_RX_RING_MASK_0, 691 WLAN_CFG_RX_RING_MASK_1, 692 WLAN_CFG_RX_RING_MASK_2, 693 0, 0, 0, 0}, 694 /* rx mon ring masks */ 695 { 0, 0, 0, 696 WLAN_CFG_RX_MON_RING_MASK_0, 697 WLAN_CFG_RX_MON_RING_MASK_1, 698 WLAN_CFG_RX_MON_RING_MASK_2, 699 0, 0, 0, 0, 0}, 700 /* host2rxdma ring masks */ 701 { 0, 0, 0, 702 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 703 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 704 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 705 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 706 0, 0, 0, 0}, 707 /* rxdma2host ring masks */ 708 { 0, 0, 0, 709 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 710 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 711 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 712 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 713 0, 0, 0, 0}, 714 /* host2rxdma mon ring masks */ 715 { 0, 0, 0, 716 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 717 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 718 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 719 0, 0, 0, 0, 0}, 720 /* rxdma2host mon ring masks */ 721 { 0, 0, 0, 722 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 723 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 724 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 725 0, 0, 0, 0, 0}, 726 /* rx err ring masks */ 727 { 0, 0, 0, 728 WLAN_CFG_RX_ERR_RING_MASK_0, 729 WLAN_CFG_RX_ERR_RING_MASK_1, 730 WLAN_CFG_RX_ERR_RING_MASK_2, 731 WLAN_CFG_RX_ERR_RING_MASK_3, 732 0, 0, 0, 0}, 733 /* rx wbm rel ring masks */ 734 { 0, 0, 0, 735 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 736 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 737 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 738 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 739 0, 0, 0, 0}, 740 /* reo status ring masks */ 741 { 0, 0, 0, 742 WLAN_CFG_REO_STATUS_RING_MASK_0, 743 WLAN_CFG_REO_STATUS_RING_MASK_1, 744 WLAN_CFG_REO_STATUS_RING_MASK_2, 745 WLAN_CFG_REO_STATUS_RING_MASK_3, 746 0, 0, 0, 0}, 747 }, 748 /* Interrupt assignment for 8 MSI combination */ 749 { 750 /* tx ring masks */ 751 { WLAN_CFG_TX_RING_MASK_0, 752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 753 /* rx ring masks */ 754 { 0, 0, 0, 0, 755 WLAN_CFG_RX_RING_MASK_0, 756 WLAN_CFG_RX_RING_MASK_1, 757 WLAN_CFG_RX_RING_MASK_2, 758 0, 0, 0, 0}, 759 /* rx mon ring masks */ 760 { 0, 0, 0, 761 WLAN_CFG_RX_MON_RING_MASK_0, 762 WLAN_CFG_RX_MON_RING_MASK_1, 763 WLAN_CFG_RX_MON_RING_MASK_2, 764 0, 0, 0, 0, 0}, 765 /* host2rxdma ring masks */ 766 { 0, 0, 0, 767 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 768 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 769 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 770 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 771 0, 0, 0, 0}, 772 /* rxdma2host ring masks */ 773 { 0, 0, 0, 774 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 775 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 776 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 777 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 778 0, 0, 0, 0}, 779 /* host2rxdma mon ring masks */ 780 { 0, 0, 0, 781 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 782 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 783 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 784 0, 0, 0, 0, 0}, 785 /* rxdma2host mon ring masks */ 786 { 0, 0, 0, 787 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 788 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 789 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 790 0, 0, 0, 0, 0}, 791 /* rx err ring masks */ 792 { 0, 0, 0, 793 WLAN_CFG_RX_ERR_RING_MASK_0, 794 WLAN_CFG_RX_ERR_RING_MASK_1, 795 WLAN_CFG_RX_ERR_RING_MASK_2, 796 WLAN_CFG_RX_ERR_RING_MASK_3, 797 0, 0, 0, 0}, 798 /* rx wbm rel ring masks */ 799 { 0, 0, 0, 800 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 801 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 802 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 803 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 804 0, 0, 0, 0}, 805 /* reo status ring masks */ 806 { 0, 0, 0, 807 WLAN_CFG_REO_STATUS_RING_MASK_0, 808 WLAN_CFG_REO_STATUS_RING_MASK_1, 809 WLAN_CFG_REO_STATUS_RING_MASK_2, 810 WLAN_CFG_REO_STATUS_RING_MASK_3, 811 0, 0, 0, 0}, 812 }, 813 }; 814 #else 815 static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = { 816 /* Interrupt assignment for integrated configuration */ 817 { 818 /* tx ring masks */ 819 { WLAN_CFG_TX_RING_MASK_0, 820 WLAN_CFG_TX_RING_MASK_1, 821 WLAN_CFG_TX_RING_MASK_2, 822 WLAN_CFG_TX_RING_MASK_3, 823 0, 0, 0, 0, 0, 0, 0}, 824 /* rx ring masks */ 825 { 0, 0, 0, 0, 0, 0, 0, 826 WLAN_CFG_RX_RING_MASK_0, 827 WLAN_CFG_RX_RING_MASK_1, 828 WLAN_CFG_RX_RING_MASK_2, 829 WLAN_CFG_RX_RING_MASK_3}, 830 /* rx mon ring masks */ 831 { 0, 0, 0, 0, 832 WLAN_CFG_RX_MON_RING_MASK_0, 833 WLAN_CFG_RX_MON_RING_MASK_1, 834 WLAN_CFG_RX_MON_RING_MASK_2, 835 0, 0, 0, 0}, 836 /* host2rxdma ring masks */ 837 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 838 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 839 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 840 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 841 0, 0, 0, 0, 0, 0, 0}, 842 /* rxdma2host ring masks */ 843 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 844 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 845 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 846 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 847 0, 0, 0, 0, 0, 0, 0}, 848 /* host2rxdma mon ring masks */ 849 { 0, 0, 0, 0, 850 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 851 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 852 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 853 0, 0, 0, 0}, 854 /* rxdma2host mon ring masks */ 855 { 0, 0, 0, 0, 856 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 857 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 858 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 859 0, 0, 0, 0}, 860 /* rx err ring masks */ 861 { WLAN_CFG_RX_ERR_RING_MASK_0, 862 WLAN_CFG_RX_ERR_RING_MASK_1, 863 WLAN_CFG_RX_ERR_RING_MASK_2, 864 WLAN_CFG_RX_ERR_RING_MASK_3, 865 0, 0, 0, 0, 0, 0, 0}, 866 /* rx wbm rel ring masks */ 867 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 868 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 869 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 870 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 871 0, 0, 0, 0, 0, 0, 0}, 872 /* reo status ring masks */ 873 { WLAN_CFG_REO_STATUS_RING_MASK_0, 874 WLAN_CFG_REO_STATUS_RING_MASK_1, 875 WLAN_CFG_REO_STATUS_RING_MASK_2, 876 WLAN_CFG_REO_STATUS_RING_MASK_3, 877 0, 0, 0, 0, 0, 0, 0}, 878 }, 879 /* Interrupt assignment for 1 MSI combination */ 880 { 881 /* tx ring masks */ 882 { WLAN_CFG_TX_RING_MASK_0 | 883 WLAN_CFG_TX_RING_MASK_1 | 884 WLAN_CFG_TX_RING_MASK_2 | 885 WLAN_CFG_TX_RING_MASK_3, 886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 887 /* rx ring masks */ 888 { WLAN_CFG_RX_RING_MASK_0 | 889 WLAN_CFG_RX_RING_MASK_1 | 890 WLAN_CFG_RX_RING_MASK_2 | 891 WLAN_CFG_RX_RING_MASK_3, 892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 893 /* rx mon ring masks */ 894 { WLAN_CFG_RX_MON_RING_MASK_0 | 895 WLAN_CFG_RX_MON_RING_MASK_1 | 896 WLAN_CFG_RX_MON_RING_MASK_2, 897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 898 /* host2rxdma ring masks */ 899 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 900 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 901 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 902 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 904 /* rxdma2host ring masks */ 905 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 906 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 907 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 908 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 910 /* host2rxdma mon ring masks */ 911 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 912 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 913 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 915 /* rxdma2host mon ring masks */ 916 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 917 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 918 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 920 /* rx err ring masks */ 921 { WLAN_CFG_RX_ERR_RING_MASK_0 | 922 WLAN_CFG_RX_ERR_RING_MASK_1 | 923 WLAN_CFG_RX_ERR_RING_MASK_2 | 924 WLAN_CFG_RX_ERR_RING_MASK_3, 925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 926 /* rx wbm rel ring masks */ 927 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 928 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 929 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 930 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 931 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 932 /* reo status ring masks */ 933 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 934 WLAN_CFG_REO_STATUS_RING_MASK_1 | 935 WLAN_CFG_REO_STATUS_RING_MASK_2 | 936 WLAN_CFG_REO_STATUS_RING_MASK_3, 937 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 938 }, 939 /* Interrupt assignment for 2 MSI combination */ 940 { 941 /* tx ring masks */ 942 { WLAN_CFG_TX_RING_MASK_0 | 943 WLAN_CFG_TX_RING_MASK_1, 944 WLAN_CFG_TX_RING_MASK_2 | 945 WLAN_CFG_TX_RING_MASK_3, 946 0, 0, 0, 0, 0, 0, 0, 0, 0}, 947 /* rx ring masks */ 948 { WLAN_CFG_RX_RING_MASK_0 | 949 WLAN_CFG_RX_RING_MASK_1, 950 WLAN_CFG_RX_RING_MASK_2 | 951 WLAN_CFG_RX_RING_MASK_3, 952 0, 0, 0, 0, 0, 0, 0, 0, 0}, 953 /* rx mon ring masks */ 954 { WLAN_CFG_RX_MON_RING_MASK_0 | 955 WLAN_CFG_RX_MON_RING_MASK_1, 956 WLAN_CFG_RX_MON_RING_MASK_2, 957 0, 0, 0, 0, 0, 0, 0, 0, 0}, 958 /* host2rxdma ring masks */ 959 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 960 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 961 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 962 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 963 0, 0, 0, 0, 0, 0, 0, 0, 0}, 964 /* rxdma2host ring masks */ 965 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 966 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 967 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 968 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 969 0, 0, 0, 0, 0, 0, 0, 0, 0}, 970 /* host2rxdma mon ring masks */ 971 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 972 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 973 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 974 0, 0, 0, 0, 0, 0, 0, 0, 0}, 975 /* rxdma2host mon ring masks */ 976 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 977 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 978 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 979 0, 0, 0, 0, 0, 0, 0, 0, 0}, 980 /* rx err ring masks */ 981 { WLAN_CFG_RX_ERR_RING_MASK_0 | 982 WLAN_CFG_RX_ERR_RING_MASK_1, 983 WLAN_CFG_RX_ERR_RING_MASK_2 | 984 WLAN_CFG_RX_ERR_RING_MASK_3, 985 0, 0, 0, 0, 0, 0, 0, 0, 0}, 986 /* rx wbm rel ring masks */ 987 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 988 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 989 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 990 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 991 0, 0, 0, 0, 0, 0, 0, 0, 0}, 992 /* reo status ring masks */ 993 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 994 WLAN_CFG_REO_STATUS_RING_MASK_1, 995 WLAN_CFG_REO_STATUS_RING_MASK_2 | 996 WLAN_CFG_REO_STATUS_RING_MASK_3, 997 0, 0, 0, 0, 0, 0, 0, 0, 0}, 998 }, 999 /* Interrupt assignment for 3 MSI combination */ 1000 { 1001 /* tx ring masks */ 1002 { WLAN_CFG_TX_RING_MASK_0 | 1003 WLAN_CFG_TX_RING_MASK_1, 1004 WLAN_CFG_TX_RING_MASK_2 | 1005 WLAN_CFG_TX_RING_MASK_3, 1006 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1007 /* rx ring masks */ 1008 { WLAN_CFG_RX_RING_MASK_0 | 1009 WLAN_CFG_RX_RING_MASK_1, 1010 WLAN_CFG_RX_RING_MASK_2 | 1011 WLAN_CFG_RX_RING_MASK_3, 1012 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1013 /* rx mon ring masks */ 1014 { 0, 0, 1015 WLAN_CFG_RX_MON_RING_MASK_0 | 1016 WLAN_CFG_RX_MON_RING_MASK_1 | 1017 WLAN_CFG_RX_MON_RING_MASK_2, 1018 0, 0, 0, 0, 0, 0, 0, 0}, 1019 /* host2rxdma ring masks */ 1020 { 0, 0, 1021 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 1022 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 1023 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 1024 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1025 0, 0, 0, 0, 0, 0, 0, 0}, 1026 /* rxdma2host ring masks */ 1027 { 0, 0, 1028 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 1029 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 1030 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 1031 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1032 0, 0, 0, 0, 0, 0, 0, 0}, 1033 /* host2rxdma mon ring masks */ 1034 { 0, 0, 1035 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 1036 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 1037 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1038 0, 0, 0, 0, 0, 0, 0, 0}, 1039 /* rxdma2host mon ring masks */ 1040 { 0, 0, 1041 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 1042 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 1043 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1044 0, 0, 0, 0, 0, 0, 0, 0}, 1045 /* rx err ring masks */ 1046 { 0, 0, 1047 WLAN_CFG_RX_ERR_RING_MASK_0 | 1048 WLAN_CFG_RX_ERR_RING_MASK_1 | 1049 WLAN_CFG_RX_ERR_RING_MASK_2 | 1050 WLAN_CFG_RX_ERR_RING_MASK_3, 1051 0, 0, 0, 0, 0, 0, 0, 0}, 1052 /* rx wbm rel ring masks */ 1053 { 0, 0, 1054 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 1055 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 1056 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 1057 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1058 0, 0, 0, 0, 0, 0, 0, 0}, 1059 /* reo status ring masks */ 1060 { 0, 0, 1061 WLAN_CFG_REO_STATUS_RING_MASK_0 | 1062 WLAN_CFG_REO_STATUS_RING_MASK_1 | 1063 WLAN_CFG_REO_STATUS_RING_MASK_2 | 1064 WLAN_CFG_REO_STATUS_RING_MASK_3, 1065 0, 0, 0, 0, 0, 0, 0, 0}, 1066 }, 1067 /* Interrupt assignment for 4 MSI combination */ 1068 { 1069 /* tx ring masks */ 1070 { WLAN_CFG_TX_RING_MASK_0, 1071 WLAN_CFG_TX_RING_MASK_1, 1072 WLAN_CFG_TX_RING_MASK_2, 1073 WLAN_CFG_TX_RING_MASK_3, 1074 0, 0, 0, 0, 0, 0, 0}, 1075 /* rx ring masks */ 1076 { WLAN_CFG_RX_RING_MASK_0, 1077 WLAN_CFG_RX_RING_MASK_1, 1078 WLAN_CFG_RX_RING_MASK_2, 1079 WLAN_CFG_RX_RING_MASK_3, 1080 0, 0, 0, 0, 0, 0, 0}, 1081 /* rx mon ring masks */ 1082 { WLAN_CFG_RX_MON_RING_MASK_0, 1083 WLAN_CFG_RX_MON_RING_MASK_1, 1084 WLAN_CFG_RX_MON_RING_MASK_2, 1085 0, 0, 0, 0, 0, 0, 0, 0}, 1086 /* host2rxdma ring masks */ 1087 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1088 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1089 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1090 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1091 0, 0, 0, 0, 0, 0, 0}, 1092 /* rxdma2host ring masks */ 1093 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1094 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1095 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1096 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1097 0, 0, 0, 0, 0, 0, 0}, 1098 /* host2rxdma mon ring masks */ 1099 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1100 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1101 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1102 0, 0, 0, 0, 0, 0, 0, 0}, 1103 /* rxdma2host mon ring masks */ 1104 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1105 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1106 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1107 0, 0, 0, 0, 0, 0, 0, 0}, 1108 /* rx err ring masks */ 1109 { WLAN_CFG_RX_ERR_RING_MASK_0, 1110 WLAN_CFG_RX_ERR_RING_MASK_1, 1111 WLAN_CFG_RX_ERR_RING_MASK_2, 1112 WLAN_CFG_RX_ERR_RING_MASK_3, 1113 0, 0, 0, 0, 0, 0, 0}, 1114 /* rx wbm rel ring masks */ 1115 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1116 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1117 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1118 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1119 0, 0, 0, 0, 0, 0, 0}, 1120 /* reo status ring masks */ 1121 { WLAN_CFG_REO_STATUS_RING_MASK_0, 1122 WLAN_CFG_REO_STATUS_RING_MASK_1, 1123 WLAN_CFG_REO_STATUS_RING_MASK_2, 1124 WLAN_CFG_REO_STATUS_RING_MASK_3, 1125 0, 0, 0, 0, 0, 0, 0}, 1126 }, 1127 /* Interrupt assignment for 5 MSI combination */ 1128 { 1129 /* tx ring masks */ 1130 { WLAN_CFG_TX_RING_MASK_0, 1131 WLAN_CFG_TX_RING_MASK_1, 1132 WLAN_CFG_TX_RING_MASK_2, 1133 WLAN_CFG_TX_RING_MASK_3, 1134 0, 0, 0, 0, 0, 0, 0}, 1135 /* rx ring masks */ 1136 { WLAN_CFG_RX_RING_MASK_0, 1137 WLAN_CFG_RX_RING_MASK_1, 1138 WLAN_CFG_RX_RING_MASK_2, 1139 WLAN_CFG_RX_RING_MASK_3, 1140 0, 0, 0, 0, 0, 0, 0}, 1141 /* rx mon ring masks */ 1142 { 0, 0, 0, 0, 1143 WLAN_CFG_RX_MON_RING_MASK_0 | 1144 WLAN_CFG_RX_MON_RING_MASK_1 | 1145 WLAN_CFG_RX_MON_RING_MASK_2, 1146 0, 0, 0, 0, 0, 0}, 1147 /* host2rxdma ring masks */ 1148 { 0, 0, 0, 0, 1149 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 1150 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 1151 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 1152 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1153 0, 0, 0, 0, 0, 0}, 1154 /* rxdma2host ring masks */ 1155 { 0, 0, 0, 0, 1156 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 1157 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 1158 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 1159 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1160 0, 0, 0, 0, 0, 0}, 1161 /* host2rxdma mon ring masks */ 1162 { 0, 0, 0, 0, 1163 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 1164 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 1165 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1166 0, 0, 0, 0, 0, 0}, 1167 /* rxdma2host mon ring masks */ 1168 { 0, 0, 0, 0, 1169 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 1170 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 1171 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1172 0, 0, 0, 0, 0, 0}, 1173 /* rx err ring masks */ 1174 { 0, 0, 0, 0, 1175 WLAN_CFG_RX_ERR_RING_MASK_0 | 1176 WLAN_CFG_RX_ERR_RING_MASK_1 | 1177 WLAN_CFG_RX_ERR_RING_MASK_2 | 1178 WLAN_CFG_RX_ERR_RING_MASK_3, 1179 0, 0, 0, 0, 0, 0}, 1180 /* rx wbm rel ring masks */ 1181 { 0, 0, 0, 0, 1182 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 1183 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 1184 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 1185 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1186 0, 0, 0, 0, 0, 0}, 1187 /* reo status ring masks */ 1188 { 0, 0, 0, 0, 1189 WLAN_CFG_REO_STATUS_RING_MASK_0 | 1190 WLAN_CFG_REO_STATUS_RING_MASK_1 | 1191 WLAN_CFG_REO_STATUS_RING_MASK_2 | 1192 WLAN_CFG_REO_STATUS_RING_MASK_3, 1193 0, 0, 0, 0, 0, 0}, 1194 }, 1195 /* Interrupt assignment for 6 MSI combination */ 1196 { 1197 /* tx ring masks */ 1198 { WLAN_CFG_TX_RING_MASK_0, 1199 WLAN_CFG_TX_RING_MASK_1, 1200 WLAN_CFG_TX_RING_MASK_2, 1201 WLAN_CFG_TX_RING_MASK_3, 1202 0, 0, 0, 0, 0, 0, 0}, 1203 /* rx ring masks */ 1204 { 0, 0, 1205 WLAN_CFG_RX_RING_MASK_0, 1206 WLAN_CFG_RX_RING_MASK_1, 1207 WLAN_CFG_RX_RING_MASK_2, 1208 WLAN_CFG_RX_RING_MASK_3, 1209 0, 0, 0, 0, 0}, 1210 /* rx mon ring masks */ 1211 { WLAN_CFG_RX_MON_RING_MASK_0, 1212 WLAN_CFG_RX_MON_RING_MASK_1, 1213 WLAN_CFG_RX_MON_RING_MASK_2, 1214 0, 0, 0, 0, 0, 0, 0, 0}, 1215 /* host2rxdma ring masks */ 1216 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1217 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1218 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1219 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1220 0, 0, 0, 0, 0, 0, 0}, 1221 /* rxdma2host ring masks */ 1222 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1223 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1224 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1225 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1226 0, 0, 0, 0, 0, 0, 0}, 1227 /* host2rxdma mon ring masks */ 1228 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1229 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1230 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1231 0, 0, 0, 0, 0, 0, 0, 0}, 1232 /* rxdma2host mon ring masks */ 1233 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1234 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1235 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1236 0, 0, 0, 0, 0, 0, 0, 0}, 1237 /* rx err ring masks */ 1238 { WLAN_CFG_RX_ERR_RING_MASK_0, 1239 WLAN_CFG_RX_ERR_RING_MASK_1, 1240 WLAN_CFG_RX_ERR_RING_MASK_2, 1241 WLAN_CFG_RX_ERR_RING_MASK_3, 1242 0, 0, 0, 0, 0, 0, 0}, 1243 /* rx wbm rel ring masks */ 1244 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1245 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1246 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1247 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1248 0, 0, 0, 0, 0, 0, 0}, 1249 /* reo status ring masks */ 1250 { WLAN_CFG_REO_STATUS_RING_MASK_0, 1251 WLAN_CFG_REO_STATUS_RING_MASK_1, 1252 WLAN_CFG_REO_STATUS_RING_MASK_2, 1253 WLAN_CFG_REO_STATUS_RING_MASK_3, 1254 0, 0, 0, 0, 0, 0, 0}, 1255 }, 1256 /* Interrupt assignment for 7 MSI combination */ 1257 { 1258 /* tx ring masks */ 1259 { WLAN_CFG_TX_RING_MASK_0, 1260 WLAN_CFG_TX_RING_MASK_1, 1261 WLAN_CFG_TX_RING_MASK_2, 1262 WLAN_CFG_TX_RING_MASK_3, 1263 0, 0, 0, 0, 0, 0, 0}, 1264 /* rx ring masks */ 1265 { 0, 0, 0, 1266 WLAN_CFG_RX_RING_MASK_0, 1267 WLAN_CFG_RX_RING_MASK_1, 1268 WLAN_CFG_RX_RING_MASK_2, 1269 WLAN_CFG_RX_RING_MASK_3, 1270 0, 0, 0}, 1271 /* rx mon ring masks */ 1272 { 0, 0, 0, 1273 WLAN_CFG_RX_MON_RING_MASK_0, 1274 WLAN_CFG_RX_MON_RING_MASK_1, 1275 WLAN_CFG_RX_MON_RING_MASK_2, 1276 0, 0, 0, 0, 0}, 1277 /* host2rxdma ring masks */ 1278 { 0, 0, 0, 1279 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1280 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1281 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1282 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1283 0, 0, 0, 0}, 1284 /* rxdma2host ring masks */ 1285 { 0, 0, 0, 1286 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1287 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1288 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1289 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1290 0, 0, 0, 0}, 1291 /* host2rxdma mon ring masks */ 1292 { 0, 0, 0, 1293 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1294 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1295 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1296 0, 0, 0, 0, 0}, 1297 /* rxdma2host mon ring masks */ 1298 { 0, 0, 0, 1299 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1300 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1301 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1302 0, 0, 0, 0, 0}, 1303 /* rx err ring masks */ 1304 { 0, 0, 0, 1305 WLAN_CFG_RX_ERR_RING_MASK_0, 1306 WLAN_CFG_RX_ERR_RING_MASK_1, 1307 WLAN_CFG_RX_ERR_RING_MASK_2, 1308 WLAN_CFG_RX_ERR_RING_MASK_3, 1309 0, 0, 0, 0}, 1310 /* rx wbm rel ring masks */ 1311 { 0, 0, 0, 1312 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1313 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1314 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1315 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1316 0, 0, 0, 0}, 1317 /* reo status ring masks */ 1318 { 0, 0, 0, 1319 WLAN_CFG_REO_STATUS_RING_MASK_0, 1320 WLAN_CFG_REO_STATUS_RING_MASK_1, 1321 WLAN_CFG_REO_STATUS_RING_MASK_2, 1322 WLAN_CFG_REO_STATUS_RING_MASK_3, 1323 0, 0, 0, 0}, 1324 }, 1325 /* Interrupt assignment for 8 MSI combination */ 1326 { 1327 /* tx ring masks */ 1328 { WLAN_CFG_TX_RING_MASK_0, 1329 WLAN_CFG_TX_RING_MASK_1, 1330 WLAN_CFG_TX_RING_MASK_2, 1331 WLAN_CFG_TX_RING_MASK_3, 1332 0, 0, 0, 0, 0, 0, 0}, 1333 /* rx ring masks */ 1334 { 0, 0, 0, 0, 1335 WLAN_CFG_RX_RING_MASK_0, 1336 WLAN_CFG_RX_RING_MASK_1, 1337 WLAN_CFG_RX_RING_MASK_2, 1338 WLAN_CFG_RX_RING_MASK_3, 1339 0, 0, 0}, 1340 /* rx mon ring masks */ 1341 { 0, 0, 0, 1342 WLAN_CFG_RX_MON_RING_MASK_0, 1343 WLAN_CFG_RX_MON_RING_MASK_1, 1344 WLAN_CFG_RX_MON_RING_MASK_2, 1345 0, 0, 0, 0, 0}, 1346 /* tx mon ring masks */ 1347 { WLAN_CFG_TX_MON_RING_MASK_0, 1348 WLAN_CFG_TX_MON_RING_MASK_1, 1349 0, 0, 0, 0, 0, 0}, 1350 /* host2rxdma ring masks */ 1351 { 0, 0, 0, 1352 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1353 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1354 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1355 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1356 0, 0, 0, 0}, 1357 /* rxdma2host ring masks */ 1358 { 0, 0, 0, 1359 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1360 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1361 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1362 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1363 0, 0, 0, 0}, 1364 /* host2rxdma mon ring masks */ 1365 { 0, 0, 0, 1366 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1367 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1368 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1369 0, 0, 0, 0, 0}, 1370 /* rxdma2host mon ring masks */ 1371 { 0, 0, 0, 1372 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1373 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1374 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1375 0, 0, 0, 0, 0}, 1376 /* rx err ring masks */ 1377 { 0, 0, 0, 1378 WLAN_CFG_RX_ERR_RING_MASK_0, 1379 WLAN_CFG_RX_ERR_RING_MASK_1, 1380 WLAN_CFG_RX_ERR_RING_MASK_2, 1381 WLAN_CFG_RX_ERR_RING_MASK_3, 1382 0, 0, 0, 0}, 1383 /* rx wbm rel ring masks */ 1384 { 0, 0, 0, 1385 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1386 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1387 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1388 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1389 0, 0, 0, 0}, 1390 /* reo status ring masks */ 1391 { 0, 0, 0, 1392 WLAN_CFG_REO_STATUS_RING_MASK_0, 1393 WLAN_CFG_REO_STATUS_RING_MASK_1, 1394 WLAN_CFG_REO_STATUS_RING_MASK_2, 1395 WLAN_CFG_REO_STATUS_RING_MASK_3, 1396 0, 0, 0, 0}, 1397 }, 1398 }; 1399 #endif 1400 #endif 1401 1402 /** 1403 * g_wlan_srng_cfg[] - Per ring_type specific configuration 1404 * 1405 */ 1406 struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES]; 1407 1408 /* REO_DST ring configuration */ 1409 struct wlan_srng_cfg wlan_srng_reo_cfg = { 1410 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING, 1411 .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING, 1412 .low_threshold = 0, 1413 }; 1414 1415 /* WBM2SW_RELEASE ring configuration */ 1416 struct wlan_srng_cfg wlan_srng_wbm_release_cfg = { 1417 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING, 1418 .batch_count_threshold = 0, 1419 .low_threshold = 0, 1420 }; 1421 1422 /* RXDMA_BUF ring configuration */ 1423 struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = { 1424 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 1425 .batch_count_threshold = 0, 1426 .low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3, 1427 }; 1428 1429 /* RXDMA_MONITOR_BUF ring configuration */ 1430 struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = { 1431 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 1432 .batch_count_threshold = 0, 1433 .low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3, 1434 }; 1435 1436 /* RXDMA_MONITOR_STATUS ring configuration */ 1437 struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = { 1438 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 1439 .batch_count_threshold = 0, 1440 .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3, 1441 }; 1442 1443 /* TX_MONITOR_BUF ring configuration */ 1444 struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = { 1445 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX, 1446 .batch_count_threshold = 0, 1447 .low_threshold = WLAN_CFG_TX_MONITOR_BUF_SIZE_MAX >> 3, 1448 }; 1449 1450 /* DEFAULT_CONFIG ring configuration */ 1451 struct wlan_srng_cfg wlan_srng_default_cfg = { 1452 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER, 1453 .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER, 1454 .low_threshold = 0, 1455 }; 1456 1457 void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg) 1458 { 1459 g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg; 1460 g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg; 1461 g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg; 1462 g_wlan_srng_cfg[REO_REINJECT] = wlan_srng_default_cfg; 1463 g_wlan_srng_cfg[REO_CMD] = wlan_srng_default_cfg; 1464 g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg; 1465 g_wlan_srng_cfg[TCL_DATA] = wlan_srng_default_cfg; 1466 g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_srng_default_cfg; 1467 g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg; 1468 g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_srng_default_cfg; 1469 g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_srng_default_cfg; 1470 g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg; 1471 g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg; 1472 g_wlan_srng_cfg[RXDMA_MONITOR_BUF] = 1473 wlan_srng_rxdma_monitor_buf_cfg; 1474 g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] = 1475 wlan_srng_rxdma_monitor_status_cfg; 1476 g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg; 1477 g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg; 1478 g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg; 1479 #ifdef WLAN_FEATURE_CIF_CFR 1480 g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg; 1481 #endif 1482 g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg; 1483 *wlan_cfg = g_wlan_srng_cfg; 1484 } 1485 1486 static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = { 1487 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, 1488 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, 1489 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, 1490 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, 1491 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa 1492 }; 1493 1494 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) 1495 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, 1496 int num_dp_msi, 1497 int interrupt_mode, 1498 bool is_monitor_mode) 1499 { int i = 0; 1500 const uint8_t *tx_ring_intr_mask = 1501 wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx); 1502 1503 for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) { 1504 wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_intr_mask[i]; 1505 if (wlan_cfg_ctx->int_tx_ring_mask[i]) 1506 wlan_cfg_ctx->tx_rings_grp_bitmap |= BIT(i); 1507 1508 wlan_cfg_ctx->int_rx_mon_ring_mask[i] = 1509 rx_mon_ring_mask_msi[i]; 1510 wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0; 1511 wlan_cfg_ctx->int_rx_err_ring_mask[i] = 1512 rx_err_ring_mask_msi[i]; 1513 wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] = 1514 rx_wbm_rel_ring_mask_msi[i]; 1515 wlan_cfg_ctx->int_reo_status_ring_mask[i] = 1516 reo_status_ring_mask_msi[i]; 1517 if (is_monitor_mode) { 1518 wlan_cfg_ctx->int_rx_ring_mask[i] = 0; 1519 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0; 1520 } else { 1521 wlan_cfg_ctx->int_rx_ring_mask[i] = 1522 rx_ring_mask_msi[i]; 1523 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 1524 rxdma2host_ring_mask_msi[i]; 1525 } 1526 wlan_cfg_ctx->int_host2rxdma_ring_mask[i] = 1527 host2rxdma_ring_mask_msi[i]; 1528 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = 1529 host2rxdma_mon_ring_mask_msi[i]; 1530 wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] = 1531 rxdma2host_mon_ring_mask_msi[i]; 1532 wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] = 1533 rx_ring_near_full_irq_1_mask_msi[i]; 1534 wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] = 1535 rx_ring_near_full_irq_2_mask_msi[i]; 1536 wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] = 1537 tx_ring_near_full_irq_mask_msi[i]; 1538 } 1539 } 1540 1541 #else 1542 1543 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, 1544 int num_dp_msi, 1545 int interrupt_mode, 1546 bool is_monitor_mode) 1547 { 1548 int i = 0; 1549 int interrupt_index = 0; 1550 1551 if(interrupt_mode == DP_INTR_INTEGRATED) { 1552 interrupt_index = 0; 1553 } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode == 1554 DP_INTR_POLL) { 1555 interrupt_index = num_dp_msi; 1556 } else { 1557 qdf_err("Interrupt mode %d", interrupt_mode); 1558 } 1559 1560 for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) { 1561 wlan_cfg_ctx->int_tx_ring_mask[i] = 1562 dp_mask_assignment[interrupt_index].tx_ring_mask[i]; 1563 wlan_cfg_ctx->int_rx_mon_ring_mask[i] = 1564 dp_mask_assignment[interrupt_index].rx_mon_ring_mask[i]; 1565 wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 1566 dp_mask_assignment[interrupt_index].tx_mon_ring_mask[i]; 1567 wlan_cfg_ctx->int_rx_err_ring_mask[i] = 1568 dp_mask_assignment[interrupt_index].rx_err_ring_mask[i]; 1569 wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] = 1570 dp_mask_assignment[interrupt_index].rx_wbm_rel_ring_mask[i]; 1571 wlan_cfg_ctx->int_reo_status_ring_mask[i] = 1572 dp_mask_assignment[interrupt_index].reo_status_ring_mask[i]; 1573 if (is_monitor_mode) { 1574 wlan_cfg_ctx->int_rx_ring_mask[i] = 0; 1575 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0; 1576 } else { 1577 wlan_cfg_ctx->int_rx_ring_mask[i] = 1578 dp_mask_assignment[interrupt_index].rx_ring_mask[i]; 1579 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 1580 dp_mask_assignment[interrupt_index].rxdma2host_ring_mask[i]; 1581 } 1582 wlan_cfg_ctx->int_host2rxdma_ring_mask[i] = 1583 dp_mask_assignment[interrupt_index].host2rxdma_ring_mask[i]; 1584 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = 1585 dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i]; 1586 wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] = 1587 dp_mask_assignment[interrupt_index].rxdma2host_mon_ring_mask[i]; 1588 wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] = 1589 dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_1_mask[i]; 1590 wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] = 1591 dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_2_mask[i]; 1592 wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] = 1593 dp_mask_assignment[interrupt_index].tx_ring_near_full_irq_mask[i]; 1594 } 1595 } 1596 #endif 1597 1598 #ifdef IPA_OFFLOAD 1599 1600 #define WLAN_CFG_IPA_ENABLE_MASK BIT(0) 1601 #ifdef IPA_WDI3_TX_TWO_PIPES 1602 /** 1603 * wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config 1604 * in dp soc cfg context 1605 * @psoc: Object manager psoc 1606 * @wlan_cfg_ctx: dp soc cfg ctx 1607 * 1608 * Return: None 1609 */ 1610 static void 1611 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1612 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1613 { 1614 wlan_cfg_ctx->ipa_enabled = (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) & 1615 WLAN_CFG_IPA_ENABLE_MASK); 1616 wlan_cfg_ctx->ipa_tx_ring_size = 1617 cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE); 1618 wlan_cfg_ctx->ipa_tx_comp_ring_size = 1619 cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE); 1620 wlan_cfg_ctx->ipa_tx_alt_ring_size = 1621 cfg_get(psoc, CFG_DP_IPA_TX_ALT_RING_SIZE); 1622 wlan_cfg_ctx->ipa_tx_alt_comp_ring_size = 1623 cfg_get(psoc, CFG_DP_IPA_TX_ALT_COMP_RING_SIZE); 1624 } 1625 #else /* !IPA_WDI3_TX_TWO_PIPES */ 1626 /** 1627 * wlan_soc_ipa_cfg_attach() - Update ipa config in dp soc 1628 * cfg context 1629 * @psoc - Object manager psoc 1630 * @wlan_cfg_ctx - dp soc cfg ctx 1631 * 1632 * Return: None 1633 */ 1634 static void 1635 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1636 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1637 { 1638 wlan_cfg_ctx->ipa_enabled = (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) & 1639 WLAN_CFG_IPA_ENABLE_MASK); 1640 wlan_cfg_ctx->ipa_tx_ring_size = 1641 cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE); 1642 wlan_cfg_ctx->ipa_tx_comp_ring_size = 1643 cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE); 1644 } 1645 #endif /* IPA_WDI3_TX_TWO_PIPES */ 1646 #else /* !IPA_OFFLOAD */ 1647 static inline void 1648 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1649 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1650 { 1651 } 1652 #endif 1653 1654 #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION 1655 static void 1656 wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1657 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1658 { 1659 wlan_cfg_ctx->hw_cc_enabled = 1660 cfg_get(psoc, CFG_DP_HW_CC_ENABLE); 1661 } 1662 #else 1663 static void 1664 wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1665 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1666 { 1667 wlan_cfg_ctx->hw_cc_enabled = true; 1668 } 1669 #endif 1670 1671 #ifdef WLAN_SUPPORT_PPEDS 1672 /** 1673 * wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc 1674 * cfg context 1675 * @psoc - Object manager psoc 1676 * @wlan_cfg_ctx - dp soc cfg ctx 1677 * 1678 * Return: None 1679 */ 1680 static void 1681 wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1682 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1683 { 1684 wlan_cfg_ctx->ppe_enable = cfg_get(psoc, CFG_DP_PPE_ENABLE); 1685 wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING); 1686 wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING); 1687 wlan_cfg_ctx->ppe_release_ring = cfg_get(psoc, 1688 CFG_DP_PPE_RELEASE_RING); 1689 } 1690 #else 1691 static inline void 1692 wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1693 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1694 { 1695 } 1696 #endif 1697 1698 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 1699 /** 1700 * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set 1701 * 1702 * Return: position of LSB which is set 1703 */ 1704 static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val) 1705 { 1706 uint8_t pos = 0; 1707 1708 while (pos < 8) { 1709 if (val & (1 << pos)) 1710 return pos; 1711 1712 pos++; 1713 } 1714 1715 return 0; 1716 } 1717 1718 /** 1719 * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc 1720 * cfg context 1721 * @psoc - Object manager psoc 1722 * @wlan_cfg_ctx - dp soc cfg ctx 1723 * 1724 * Return: None 1725 */ 1726 static void 1727 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1728 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1729 { 1730 uint8_t rx_ring_map; 1731 1732 rx_ring_map = 1733 cfg_get(psoc, CFG_DP_MLO_CHIP0_RX_RING_MAP); 1734 wlan_cfg_ctx->mlo_chip_rx_ring_map[0] = rx_ring_map; 1735 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[0] = 1736 wlan_cfg_get_lsb_set_pos(rx_ring_map); 1737 wlan_cfg_ctx->lmac_peer_id_msb[0] = 1; 1738 1739 rx_ring_map = 1740 cfg_get(psoc, CFG_DP_MLO_CHIP1_RX_RING_MAP); 1741 wlan_cfg_ctx->mlo_chip_rx_ring_map[1] = rx_ring_map; 1742 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[1] = 1743 wlan_cfg_get_lsb_set_pos(rx_ring_map); 1744 wlan_cfg_ctx->lmac_peer_id_msb[1] = 2; 1745 1746 rx_ring_map = 1747 cfg_get(psoc, CFG_DP_MLO_CHIP2_RX_RING_MAP); 1748 wlan_cfg_ctx->mlo_chip_rx_ring_map[2] = rx_ring_map; 1749 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[2] = 1750 wlan_cfg_get_lsb_set_pos(rx_ring_map); 1751 wlan_cfg_ctx->lmac_peer_id_msb[2] = 3; 1752 } 1753 #else 1754 static inline void 1755 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1756 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1757 { 1758 } 1759 #endif 1760 1761 #ifdef WLAN_FEATURE_11BE_MLO 1762 /** 1763 * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc 1764 * cfg context 1765 * @psoc - Object manager psoc 1766 * @wlan_cfg_ctx - dp soc cfg ctx 1767 * 1768 * Return: None 1769 */ 1770 static void 1771 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1772 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1773 { 1774 wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 1775 } 1776 #else 1777 static inline void 1778 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1779 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1780 { 1781 } 1782 #endif 1783 1784 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 1785 /** 1786 * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc 1787 * cfg context 1788 * @psoc - Object manager psoc 1789 * @wlan_cfg_ctx - dp soc cfg ctx 1790 * 1791 * Return: None 1792 */ 1793 static void 1794 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1795 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1796 { 1797 wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc, 1798 CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG); 1799 wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc, 1800 CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER); 1801 } 1802 #else 1803 static void 1804 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 1805 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 1806 { 1807 } 1808 #endif 1809 1810 /** 1811 * wlan_cfg_soc_attach() - Allocate and prepare SoC configuration 1812 * @psoc - Object manager psoc 1813 * Return: wlan_cfg_ctx - Handle to Configuration context 1814 */ 1815 struct wlan_cfg_dp_soc_ctxt * 1816 wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) 1817 { 1818 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx = 1819 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt)); 1820 uint32_t gro_bit_set; 1821 1822 if (!wlan_cfg_ctx) 1823 return NULL; 1824 1825 wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE; 1826 wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS; 1827 wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS); 1828 wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE); 1829 wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING); 1830 wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS); 1831 wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS); 1832 wlan_cfg_ctx->num_nss_reo_dest_rings = 1833 cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS); 1834 wlan_cfg_ctx->num_nss_tcl_data_rings = 1835 cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS); 1836 wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING); 1837 wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING); 1838 wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS; 1839 wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc, 1840 CFG_DP_TX_EXT_DESC_POOLS); 1841 wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC); 1842 wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN; 1843 wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC); 1844 wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE); 1845 wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID); 1846 1847 wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE); 1848 wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc, 1849 CFG_DP_TX_COMPL_RING_SIZE); 1850 1851 wlan_cfg_ctx->tx_comp_ring_size_nss = 1852 cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE); 1853 1854 wlan_cfg_ctx->int_batch_threshold_tx = 1855 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX); 1856 wlan_cfg_ctx->int_timer_threshold_tx = 1857 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX); 1858 wlan_cfg_ctx->int_batch_threshold_rx = 1859 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX); 1860 wlan_cfg_ctx->int_timer_threshold_rx = 1861 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX); 1862 wlan_cfg_ctx->int_batch_threshold_other = 1863 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER); 1864 wlan_cfg_ctx->int_timer_threshold_other = 1865 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER); 1866 wlan_cfg_ctx->pktlog_buffer_size = 1867 cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE); 1868 1869 /* This is default mapping and can be overridden by HW config 1870 * received from FW */ 1871 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0); 1872 if (MAX_PDEV_CNT > 1) 1873 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2); 1874 if (MAX_PDEV_CNT > 2) 1875 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1); 1876 1877 wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID); 1878 1879 wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH); 1880 wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO); 1881 wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO); 1882 wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG); 1883 gro_bit_set = cfg_get(psoc, CFG_DP_GRO); 1884 if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) { 1885 wlan_cfg_ctx->gro_enabled = true; 1886 if (gro_bit_set & DP_FORCE_USE_GRO_BIT_SET) 1887 wlan_cfg_ctx->force_gro_enabled = true; 1888 } 1889 wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM); 1890 wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM); 1891 wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE); 1892 wlan_cfg_ctx->peer_flow_ctrl_enabled = 1893 cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL); 1894 wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI); 1895 wlan_cfg_ctx->p2p_tcp_udp_checksumoffload = 1896 cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD); 1897 wlan_cfg_ctx->nan_tcp_udp_checksumoffload = 1898 cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD); 1899 wlan_cfg_ctx->tcp_udp_checksumoffload = 1900 cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD); 1901 wlan_cfg_ctx->legacy_mode_checksumoffload_disable = 1902 cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE); 1903 wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING); 1904 wlan_cfg_ctx->defrag_timeout_check = 1905 cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK); 1906 wlan_cfg_ctx->rx_defrag_min_timeout = 1907 cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT); 1908 1909 wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc, 1910 CFG_DP_WBM_RELEASE_RING); 1911 wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc, 1912 CFG_DP_TCL_CMD_CREDIT_RING); 1913 wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc, 1914 CFG_DP_TCL_STATUS_RING); 1915 wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc, 1916 CFG_DP_RX_DESTINATION_RING); 1917 wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc, 1918 CFG_DP_REO_REINJECT_RING); 1919 wlan_cfg_ctx->rx_release_ring = cfg_get(psoc, 1920 CFG_DP_RX_RELEASE_RING); 1921 wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc, 1922 CFG_DP_REO_EXCEPTION_RING); 1923 wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc, 1924 CFG_DP_REO_CMD_RING); 1925 wlan_cfg_ctx->reo_status_ring = cfg_get(psoc, 1926 CFG_DP_REO_STATUS_RING); 1927 wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc, 1928 CFG_DP_RXDMA_REFILL_RING); 1929 wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc, 1930 CFG_DP_TX_DESC_LIMIT_0); 1931 wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc, 1932 CFG_DP_TX_DESC_LIMIT_1); 1933 wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc, 1934 CFG_DP_TX_DESC_LIMIT_2); 1935 wlan_cfg_ctx->tx_device_limit = cfg_get(psoc, 1936 CFG_DP_TX_DEVICE_LIMIT); 1937 wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc, 1938 CFG_DP_TX_SW_INTERNODE_QUEUE); 1939 wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc, 1940 CFG_DP_RXDMA_ERR_DST_RING); 1941 wlan_cfg_ctx->enable_data_stall_detection = 1942 cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION); 1943 wlan_cfg_ctx->tx_flow_start_queue_offset = 1944 cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET); 1945 wlan_cfg_ctx->tx_flow_stop_queue_threshold = 1946 cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH); 1947 wlan_cfg_ctx->disable_intra_bss_fwd = 1948 cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION); 1949 wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc, 1950 CFG_DP_RX_SW_DESC_WEIGHT); 1951 wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc, 1952 CFG_DP_RX_SW_DESC_NUM); 1953 wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key; 1954 wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH; 1955 wlan_cfg_ctx->is_rx_flow_tag_enabled = 1956 cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE); 1957 wlan_cfg_ctx->is_rx_flow_search_table_per_pdev = 1958 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV); 1959 wlan_cfg_ctx->rx_flow_search_table_size = 1960 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE); 1961 wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled = 1962 cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE); 1963 wlan_cfg_ctx->mon_drop_thresh = 1964 cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD); 1965 wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE); 1966 wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP); 1967 wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS); 1968 wlan_cfg_ctx->is_rx_buff_pool_enabled = 1969 cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE); 1970 wlan_cfg_ctx->is_rx_refill_buff_pool_enabled = 1971 cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE); 1972 wlan_cfg_ctx->rx_pending_high_threshold = 1973 cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD); 1974 wlan_cfg_ctx->rx_pending_low_threshold = 1975 cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD); 1976 wlan_cfg_ctx->is_poll_mode_enabled = 1977 cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE); 1978 wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE); 1979 wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM); 1980 wlan_cfg_ctx->tx_per_pkt_vdev_id_check = 1981 cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK); 1982 wlan_cfg_ctx->radio0_rx_default_reo = 1983 cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO); 1984 wlan_cfg_ctx->radio1_rx_default_reo = 1985 cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO); 1986 wlan_cfg_ctx->radio2_rx_default_reo = 1987 cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO); 1988 wlan_cfg_ctx->wow_check_rx_pending_enable = 1989 cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING); 1990 wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc, 1991 CFG_DP_DELAY_MON_REPLENISH); 1992 wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc, 1993 CFG_DP_RXDMA_MONITOR_BUF_RING); 1994 wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc, 1995 CFG_DP_TX_MONITOR_BUF_RING); 1996 wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx); 1997 wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx); 1998 wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx); 1999 wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 2000 wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx); 2001 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 2002 wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) & 2003 PKT_CAPTURE_MODE_DATA_ONLY; 2004 #endif 2005 2006 return wlan_cfg_ctx; 2007 } 2008 2009 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2010 { 2011 qdf_mem_free(wlan_cfg_ctx); 2012 } 2013 2014 struct wlan_cfg_dp_pdev_ctxt * 2015 wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc) 2016 { 2017 struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx = 2018 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt)); 2019 2020 if (!wlan_cfg_ctx) 2021 return NULL; 2022 2023 wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc, 2024 CFG_DP_RXDMA_BUF_RING); 2025 wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc, 2026 CFG_DP_RXDMA_MONITOR_BUF_RING); 2027 wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc, 2028 CFG_DP_RXDMA_MONITOR_DST_RING); 2029 wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc, 2030 CFG_DP_TX_MONITOR_DST_RING); 2031 wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc, 2032 CFG_DP_RXDMA_MONITOR_STATUS_RING); 2033 wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc, 2034 CFG_DP_RXDMA_MONITOR_DESC_RING); 2035 wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV; 2036 2037 return wlan_cfg_ctx; 2038 } 2039 2040 void wlan_cfg_set_mon_delayed_replenish_entries( 2041 struct wlan_cfg_dp_soc_ctxt *cfg, 2042 uint32_t val) 2043 { 2044 cfg->delayed_replenish_entries = val; 2045 } 2046 2047 qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries); 2048 2049 int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg) 2050 { 2051 return cfg->delayed_replenish_entries; 2052 } 2053 2054 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx) 2055 { 2056 if (wlan_cfg_ctx) 2057 qdf_mem_free(wlan_cfg_ctx); 2058 } 2059 2060 int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg) 2061 { 2062 return cfg->mon_drop_thresh; 2063 } 2064 2065 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num) 2066 { 2067 cfg->num_int_ctxts = num; 2068 } 2069 2070 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2071 { 2072 cfg->max_peer_id = val; 2073 } 2074 2075 void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2076 { 2077 cfg->max_ast_idx = val; 2078 } 2079 2080 int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg) 2081 { 2082 return cfg->max_ast_idx; 2083 } 2084 2085 qdf_export_symbol(wlan_cfg_get_max_ast_idx); 2086 2087 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2088 int context, int mask) 2089 { 2090 cfg->int_tx_ring_mask[context] = mask; 2091 } 2092 2093 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2094 int context, int mask) 2095 { 2096 cfg->int_rx_ring_mask[context] = mask; 2097 } 2098 2099 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2100 int context, int mask) 2101 { 2102 cfg->int_rx_mon_ring_mask[context] = mask; 2103 } 2104 2105 void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2106 int context, int mask) 2107 { 2108 cfg->int_tx_mon_ring_mask[context] = mask; 2109 } 2110 2111 int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2112 int context) 2113 { 2114 return cfg->int_host2rxdma_mon_ring_mask[context]; 2115 } 2116 2117 void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2118 int context, int mask) 2119 { 2120 cfg->int_host2rxdma_mon_ring_mask[context] = mask; 2121 } 2122 2123 int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2124 int context) 2125 { 2126 return cfg->int_rxdma2host_mon_ring_mask[context]; 2127 } 2128 2129 void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2130 int context, int mask) 2131 { 2132 cfg->int_rxdma2host_mon_ring_mask[context] = mask; 2133 } 2134 2135 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2136 int context, int mask) 2137 { 2138 cfg->int_rxdma2host_ring_mask[context] = mask; 2139 } 2140 2141 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2142 int context) 2143 { 2144 return cfg->int_rxdma2host_ring_mask[context]; 2145 } 2146 2147 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2148 int context, int mask) 2149 { 2150 cfg->int_host2rxdma_ring_mask[context] = mask; 2151 } 2152 2153 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2154 int context) 2155 { 2156 return cfg->int_host2rxdma_ring_mask[context]; 2157 } 2158 2159 int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2160 int context) 2161 { 2162 return cfg->int_rx_ring_near_full_irq_1_mask[context]; 2163 } 2164 2165 int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2166 int context) 2167 { 2168 return cfg->int_rx_ring_near_full_irq_2_mask[context]; 2169 } 2170 2171 int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2172 int context) 2173 { 2174 return cfg->int_tx_ring_near_full_irq_mask[context]; 2175 } 2176 2177 void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 2178 int hw_macid) 2179 { 2180 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 2181 cfg->hw_macid[pdev_idx] = hw_macid; 2182 } 2183 2184 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx) 2185 { 2186 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 2187 return cfg->hw_macid[pdev_idx]; 2188 } 2189 2190 qdf_export_symbol(wlan_cfg_get_hw_mac_idx); 2191 2192 int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, 2193 int hw_macid) 2194 { 2195 int idx; 2196 2197 for (idx = 0; idx < MAX_PDEV_CNT; idx++) { 2198 if (cfg->hw_macid[idx] == hw_macid) 2199 return (idx + 1); 2200 } 2201 qdf_assert_always(idx < MAX_PDEV_CNT); 2202 return WLAN_INVALID_PDEV_ID; 2203 } 2204 2205 void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 2206 int hw_macid) 2207 { 2208 qdf_assert_always((pdev_idx < MAX_PDEV_CNT) || 2209 (pdev_idx == INVALID_PDEV_ID)); 2210 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 2211 cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx; 2212 } 2213 2214 int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid) 2215 { 2216 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 2217 return cfg->hw_macid_pdev_id_map[hw_macid]; 2218 } 2219 2220 qdf_export_symbol(wlan_cfg_get_pdev_idx); 2221 2222 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2223 int context, int mask) 2224 { 2225 cfg->int_ce_ring_mask[context] = mask; 2226 } 2227 2228 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context, 2229 int mask) 2230 { 2231 cfg->int_rx_ring_mask[context] = mask; 2232 } 2233 2234 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2235 int context, int mask) 2236 { 2237 return cfg->int_rx_err_ring_mask[context] = mask; 2238 } 2239 2240 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2241 int context, int mask) 2242 { 2243 return cfg->int_rx_wbm_rel_ring_mask[context] = mask; 2244 } 2245 2246 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2247 int context, int mask) 2248 { 2249 return cfg->int_reo_status_ring_mask[context] = mask; 2250 } 2251 2252 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg) 2253 { 2254 return cfg->num_int_ctxts; 2255 } 2256 2257 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 2258 { 2259 return cfg->int_tx_ring_mask[context]; 2260 } 2261 2262 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 2263 { 2264 return cfg->int_rx_ring_mask[context]; 2265 } 2266 2267 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2268 int context) 2269 { 2270 return cfg->int_rx_err_ring_mask[context]; 2271 } 2272 2273 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2274 int context) 2275 { 2276 return cfg->int_rx_wbm_rel_ring_mask[context]; 2277 } 2278 2279 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2280 int context) 2281 { 2282 return cfg->int_reo_status_ring_mask[context]; 2283 } 2284 2285 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 2286 { 2287 return cfg->int_rx_mon_ring_mask[context]; 2288 } 2289 2290 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 2291 { 2292 return cfg->int_tx_mon_ring_mask[context]; 2293 } 2294 2295 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 2296 { 2297 return cfg->int_ce_ring_mask[context]; 2298 } 2299 2300 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg) 2301 { 2302 return cfg->max_clients; 2303 } 2304 2305 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2306 { 2307 return cfg->max_alloc_size; 2308 } 2309 2310 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 2311 { 2312 return cfg->per_pdev_tx_ring; 2313 } 2314 2315 uint32_t 2316 wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 2317 { 2318 return cfg->rx_pending_high_threshold; 2319 } 2320 2321 uint32_t 2322 wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 2323 { 2324 return cfg->rx_pending_low_threshold; 2325 } 2326 2327 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 2328 { 2329 return cfg->per_pdev_lmac_ring; 2330 } 2331 2332 qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring); 2333 2334 #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL) 2335 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2336 { 2337 return 1; 2338 } 2339 2340 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2341 { 2342 return 1; 2343 } 2344 2345 #else 2346 2347 #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL) 2348 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2349 { 2350 if (!cfg->ipa_enabled) 2351 return cfg->num_tcl_data_rings; 2352 2353 return 1; 2354 } 2355 2356 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2357 { 2358 if (!cfg->ipa_enabled) 2359 return cfg->num_nss_tcl_data_rings; 2360 2361 return 1; 2362 } 2363 #else 2364 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2365 { 2366 return cfg->num_tcl_data_rings; 2367 } 2368 2369 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2370 { 2371 return cfg->num_nss_tcl_data_rings; 2372 } 2373 #endif 2374 #endif 2375 2376 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2377 { 2378 return cfg->tx_ring_size; 2379 } 2380 2381 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2382 { 2383 return cfg->tx_comp_ring_size; 2384 } 2385 2386 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 2387 { 2388 return cfg->per_pdev_rx_ring; 2389 } 2390 2391 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2392 { 2393 return cfg->num_reo_dest_rings; 2394 } 2395 2396 int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 2397 { 2398 return cfg->num_nss_reo_dest_rings; 2399 } 2400 2401 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg) 2402 { 2403 return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/ 2404 } 2405 2406 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 2407 { 2408 return cfg->num_tx_desc_pool; 2409 } 2410 2411 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 2412 { 2413 cfg->num_tx_desc_pool = num_pool; 2414 } 2415 2416 int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 2417 { 2418 return cfg->num_tx_ext_desc_pool; 2419 } 2420 2421 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 2422 { 2423 cfg->num_tx_ext_desc_pool = num_pool; 2424 } 2425 2426 int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2427 { 2428 return cfg->reo_dst_ring_size; 2429 } 2430 2431 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg, 2432 int reo_dst_ring_size) 2433 { 2434 cfg->reo_dst_ring_size = reo_dst_ring_size; 2435 } 2436 2437 void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg, 2438 bool raw_mode_war) 2439 { 2440 cfg->raw_mode_war = raw_mode_war; 2441 } 2442 2443 bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg) 2444 { 2445 return cfg->raw_mode_war; 2446 } 2447 2448 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 2449 { 2450 return cfg->num_tx_desc; 2451 } 2452 2453 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc) 2454 { 2455 cfg->num_tx_desc = num_desc; 2456 } 2457 2458 int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 2459 { 2460 return cfg->min_tx_desc; 2461 } 2462 2463 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 2464 { 2465 return cfg->num_tx_ext_desc; 2466 } 2467 2468 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc) 2469 { 2470 cfg->num_tx_ext_desc = num_ext_desc; 2471 } 2472 2473 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg) 2474 { 2475 /* TODO: This should be calculated based on target capabilities */ 2476 return cfg->max_peer_id; 2477 } 2478 2479 int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2480 { 2481 return cfg->dma_mon_buf_ring_size; 2482 } 2483 2484 qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size); 2485 2486 int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2487 { 2488 return cfg->dma_rx_mon_dest_ring_size; 2489 } 2490 2491 qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size); 2492 2493 int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2494 { 2495 return cfg->dma_tx_mon_dest_ring_size; 2496 } 2497 2498 qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size); 2499 2500 int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2501 { 2502 return cfg->dma_mon_status_ring_size; 2503 } 2504 2505 qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size); 2506 2507 int 2508 wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2509 { 2510 return cfg->rxdma_monitor_desc_ring; 2511 } 2512 2513 qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size); 2514 2515 int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 2516 { 2517 return cfg->rx_dma_buf_ring_size; 2518 } 2519 2520 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg) 2521 { 2522 return cfg->num_mac_rings; 2523 } 2524 2525 qdf_export_symbol(wlan_cfg_get_num_mac_rings); 2526 2527 bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2528 { 2529 return cfg->gro_enabled; 2530 } 2531 2532 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2533 { 2534 return cfg->lro_enabled; 2535 } 2536 2537 bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2538 { 2539 return cfg->ipa_enabled; 2540 } 2541 2542 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 2543 { 2544 cfg->rx_hash = val; 2545 } 2546 2547 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2548 { 2549 return cfg->rx_hash; 2550 } 2551 2552 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg) 2553 { 2554 return cfg->nss_enabled; 2555 } 2556 2557 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled) 2558 { 2559 cfg->nss_enabled = nss_enabled; 2560 } 2561 2562 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg) 2563 { 2564 return cfg->nss_cfg; 2565 } 2566 2567 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg) 2568 { 2569 cfg->nss_cfg = nss_cfg; 2570 if (cfg->nss_cfg) 2571 cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss; 2572 } 2573 2574 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 2575 { 2576 return cfg->int_batch_threshold_tx; 2577 } 2578 2579 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 2580 { 2581 return cfg->int_timer_threshold_tx; 2582 } 2583 2584 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 2585 { 2586 return cfg->int_batch_threshold_rx; 2587 } 2588 2589 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 2590 { 2591 return cfg->int_timer_threshold_rx; 2592 } 2593 2594 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 2595 { 2596 return cfg->int_batch_threshold_other; 2597 } 2598 2599 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 2600 { 2601 return cfg->int_timer_threshold_other; 2602 } 2603 2604 int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg) 2605 { 2606 return cfg->int_timer_threshold_mon; 2607 } 2608 2609 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 2610 { 2611 return cfg->p2p_tcp_udp_checksumoffload; 2612 } 2613 2614 int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 2615 { 2616 return cfg->nan_tcp_udp_checksumoffload; 2617 } 2618 2619 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 2620 { 2621 return cfg->tcp_udp_checksumoffload; 2622 } 2623 2624 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg) 2625 { 2626 return cfg->rx_defrag_min_timeout; 2627 } 2628 2629 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg) 2630 { 2631 return cfg->defrag_timeout_check; 2632 } 2633 2634 int 2635 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2636 { 2637 return cfg->wbm_release_ring; 2638 } 2639 2640 int 2641 wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2642 { 2643 return cfg->tcl_cmd_credit_ring; 2644 } 2645 2646 int 2647 wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2648 { 2649 return cfg->tcl_status_ring; 2650 } 2651 2652 int 2653 wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2654 { 2655 return cfg->reo_reinject_ring; 2656 } 2657 2658 int 2659 wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2660 { 2661 return cfg->rx_release_ring; 2662 } 2663 2664 int 2665 wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2666 { 2667 return cfg->reo_exception_ring; 2668 } 2669 2670 int 2671 wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2672 { 2673 return cfg->reo_cmd_ring; 2674 } 2675 2676 int 2677 wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2678 { 2679 return cfg->reo_status_ring; 2680 } 2681 2682 int 2683 wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2684 { 2685 return cfg->rxdma_refill_ring; 2686 } 2687 2688 int 2689 wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg) 2690 { 2691 return cfg->tx_desc_limit_0; 2692 } 2693 2694 int 2695 wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg) 2696 { 2697 return cfg->tx_desc_limit_1; 2698 } 2699 2700 int 2701 wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg) 2702 { 2703 return cfg->tx_desc_limit_2; 2704 } 2705 2706 int 2707 wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg) 2708 { 2709 return cfg->tx_device_limit; 2710 } 2711 2712 int 2713 wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg) 2714 { 2715 return cfg->tx_sw_internode_queue; 2716 } 2717 2718 int 2719 wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2720 { 2721 return cfg->rxdma_err_dst_ring; 2722 } 2723 2724 int 2725 wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg) 2726 { 2727 return cfg->rx_sw_desc_weight; 2728 } 2729 2730 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight); 2731 2732 int 2733 wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg) 2734 { 2735 return cfg->rx_sw_desc_num; 2736 } 2737 2738 uint32_t 2739 wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg) 2740 { 2741 return cfg->reo_rings_mapping; 2742 } 2743 2744 bool 2745 wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg, 2746 enum cdp_capabilities dp_caps) 2747 { 2748 switch (dp_caps) { 2749 case CDP_CFG_DP_TSO: 2750 return cfg->tso_enabled; 2751 case CDP_CFG_DP_LRO: 2752 return cfg->lro_enabled; 2753 case CDP_CFG_DP_SG: 2754 return cfg->sg_enabled; 2755 case CDP_CFG_DP_GRO: 2756 return cfg->gro_enabled; 2757 case CDP_CFG_DP_OL_TX_CSUM: 2758 return cfg->ol_tx_csum_enabled; 2759 case CDP_CFG_DP_OL_RX_CSUM: 2760 return cfg->ol_rx_csum_enabled; 2761 case CDP_CFG_DP_RAWMODE: 2762 return cfg->rawmode_enabled; 2763 case CDP_CFG_DP_PEER_FLOW_CTRL: 2764 return cfg->peer_flow_ctrl_enabled; 2765 default: 2766 return false; 2767 } 2768 } 2769 2770 void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg, 2771 bool val) 2772 { 2773 cfg->is_tso_desc_attach_defer = val; 2774 } 2775 2776 bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg) 2777 { 2778 return cfg->is_tso_desc_attach_defer; 2779 } 2780 2781 #ifdef QCA_LL_TX_FLOW_CONTROL_V2 2782 /** 2783 * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold 2784 * @cfg: config context 2785 * 2786 * Return: stop threshold 2787 */ 2788 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg) 2789 { 2790 return cfg->tx_flow_stop_queue_threshold; 2791 } 2792 2793 /** 2794 * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset 2795 * for TX to resume 2796 * @cfg: config context 2797 * 2798 * Return: stop threshold 2799 */ 2800 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg) 2801 { 2802 return cfg->tx_flow_start_queue_offset; 2803 } 2804 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ 2805 2806 void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 2807 bool val) 2808 { 2809 cfg->is_rx_flow_tag_enabled = val; 2810 } 2811 2812 uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg) 2813 { 2814 return cfg->rx_toeplitz_hash_key; 2815 } 2816 2817 uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg) 2818 { 2819 return cfg->rx_flow_max_search; 2820 } 2821 2822 bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2823 { 2824 return cfg->is_rx_flow_tag_enabled; 2825 } 2826 2827 qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled); 2828 2829 #ifdef WLAN_SUPPORT_RX_FISA 2830 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2831 { 2832 return (bool)(cfg->is_rx_fisa_enabled); 2833 } 2834 #else 2835 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2836 { 2837 return false; 2838 } 2839 #endif 2840 2841 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2842 { 2843 return (bool)(cfg->is_poll_mode_enabled); 2844 } 2845 2846 void 2847 wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg, 2848 bool val) 2849 { 2850 cfg->is_rx_flow_search_table_per_pdev = val; 2851 } 2852 2853 bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg) 2854 { 2855 return cfg->is_rx_flow_search_table_per_pdev; 2856 } 2857 2858 void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg, 2859 uint16_t val) 2860 { 2861 cfg->rx_flow_search_table_size = val; 2862 } 2863 2864 uint16_t 2865 wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2866 { 2867 return cfg->rx_flow_search_table_size; 2868 } 2869 2870 void 2871 wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 2872 bool val) 2873 { 2874 cfg->is_rx_mon_protocol_flow_tag_enabled = val; 2875 } 2876 2877 bool 2878 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2879 { 2880 return cfg->is_rx_mon_protocol_flow_tag_enabled; 2881 } 2882 2883 qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled); 2884 2885 void 2886 wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg, 2887 bool val) 2888 { 2889 cfg->tx_per_pkt_vdev_id_check = val; 2890 } 2891 2892 bool 2893 wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2894 { 2895 return cfg->tx_per_pkt_vdev_id_check; 2896 } 2897 2898 void 2899 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg, 2900 bool val) 2901 { 2902 cfg->pext_stats_enabled = val; 2903 } 2904 2905 bool 2906 wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2907 { 2908 return cfg->pext_stats_enabled; 2909 } 2910 2911 bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2912 { 2913 return cfg->fst_in_cmem; 2914 } 2915 2916 #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL 2917 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2918 { 2919 return cfg->is_rx_buff_pool_enabled; 2920 } 2921 2922 bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2923 { 2924 return cfg->is_rx_refill_buff_pool_enabled; 2925 } 2926 #else 2927 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2928 { 2929 return false; 2930 } 2931 2932 bool wlan_cfg_is_rx_refill_buffer_pool_enabled( 2933 struct wlan_cfg_dp_soc_ctxt *cfg) 2934 { 2935 return false; 2936 } 2937 #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */ 2938 2939 #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR 2940 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2941 { 2942 return (bool)(cfg->is_swlm_enabled); 2943 } 2944 #else 2945 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 2946 { 2947 return false; 2948 } 2949 #endif 2950 uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 2951 { 2952 return cfg->radio0_rx_default_reo; 2953 } 2954 2955 uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 2956 { 2957 return cfg->radio1_rx_default_reo; 2958 } 2959 2960 uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 2961 { 2962 return cfg->radio2_rx_default_reo; 2963 } 2964 2965 void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg) 2966 { 2967 cfg->rxdma1_enable = true; 2968 } 2969 2970 void 2971 wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, 2972 bool val) 2973 { 2974 cfg->delay_mon_replenish = val; 2975 } 2976 2977 bool 2978 wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg) 2979 { 2980 return cfg->delay_mon_replenish; 2981 } 2982 2983 qdf_export_symbol(wlan_cfg_is_delay_mon_replenish); 2984 2985 void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg) 2986 { 2987 dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,", 2988 cfg->delay_mon_replenish); 2989 dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d", 2990 cfg->reo_dst_ring_size, cfg->delayed_replenish_entries); 2991 } 2992 2993 #ifdef IPA_OFFLOAD 2994 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 2995 { 2996 return cfg->ipa_tx_ring_size; 2997 } 2998 2999 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3000 { 3001 return cfg->ipa_tx_comp_ring_size; 3002 } 3003 3004 #ifdef IPA_WDI3_TX_TWO_PIPES 3005 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3006 { 3007 return cfg->ipa_tx_alt_ring_size; 3008 } 3009 3010 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3011 { 3012 return cfg->ipa_tx_alt_comp_ring_size; 3013 } 3014 3015 #else 3016 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3017 { 3018 return cfg->ipa_tx_ring_size; 3019 } 3020 3021 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3022 { 3023 return cfg->ipa_tx_comp_ring_size; 3024 } 3025 #endif 3026 #endif 3027 3028 #ifdef WLAN_SUPPORT_PPEDS 3029 bool 3030 wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3031 { 3032 return cfg->ppe_enable; 3033 } 3034 3035 int 3036 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3037 { 3038 return cfg->reo2ppe_ring; 3039 } 3040 3041 int 3042 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3043 { 3044 return cfg->ppe2tcl_ring; 3045 } 3046 3047 int 3048 wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3049 { 3050 return cfg->ppe_release_ring; 3051 } 3052 #endif 3053 3054 void 3055 wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 3056 struct wlan_dp_prealloc_cfg *cfg) 3057 { 3058 if (!ctrl_psoc || !cfg) 3059 return; 3060 3061 cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE); 3062 cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc, 3063 CFG_DP_TX_COMPL_RING_SIZE); 3064 cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc, 3065 CFG_DP_WBM_RELEASE_RING); 3066 cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc, 3067 CFG_DP_RXDMA_ERR_DST_RING); 3068 cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc, 3069 CFG_DP_REO_EXCEPTION_RING); 3070 cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC); 3071 cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC); 3072 } 3073 3074 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 3075 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg) 3076 { 3077 return cfg->pkt_capture_mode; 3078 } 3079 #endif 3080 3081 uint32_t 3082 wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3083 { 3084 return cfg->rx_mon_buf_ring_size; 3085 } 3086 3087 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size); 3088 3089 uint32_t 3090 wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3091 { 3092 return cfg->tx_mon_buf_ring_size; 3093 } 3094 3095 qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size); 3096 3097 uint8_t 3098 wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg) 3099 { 3100 return cfg->rx_rel_wbm2sw_ring_id; 3101 } 3102 3103 void 3104 wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3105 uint8_t wbm2sw_ring_id) 3106 { 3107 cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id; 3108 } 3109 3110 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 3111 uint8_t 3112 wlan_cfg_mlo_rx_ring_map_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3113 uint8_t chip_id) 3114 { 3115 return cfg->mlo_chip_rx_ring_map[chip_id]; 3116 } 3117 3118 uint8_t 3119 wlan_cfg_mlo_default_rx_ring_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3120 uint8_t chip_id) 3121 { 3122 return cfg->mlo_chip_default_rx_ring_id[chip_id]; 3123 } 3124 3125 uint8_t 3126 wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3127 uint8_t chip_id) 3128 { 3129 return cfg->lmac_peer_id_msb[chip_id]; 3130 } 3131 #endif 3132 3133 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 3134 bool 3135 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 3136 { 3137 return cfg->vdev_stats_hw_offload_config; 3138 } 3139 3140 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 3141 { 3142 return cfg->vdev_stats_hw_offload_timer; 3143 } 3144 3145 void 3146 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 3147 bool val) 3148 { 3149 cfg->vdev_stats_hw_offload_config = val; 3150 } 3151 #else 3152 bool 3153 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 3154 { 3155 return false; 3156 } 3157 3158 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 3159 { 3160 return 0; 3161 } 3162 3163 void 3164 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 3165 bool val) 3166 {} 3167 #endif 3168