1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #include "wlan_ipa_ucfg_api.h" 21 #if defined(CONFIG_HL_SUPPORT) 22 #include "wlan_tgt_def_config_hl.h" 23 #else 24 #include "wlan_tgt_def_config.h" 25 #endif 26 27 #include "qdf_trace.h" 28 #include "qdf_mem.h" 29 #include <cdp_txrx_ops.h> 30 #include "wlan_cfg.h" 31 #include "cfg_ucfg_api.h" 32 #include "hal_api.h" 33 #include "dp_types.h" 34 #include <qdf_module.h> 35 36 /* 37 * The max allowed size for tx comp ring is 8191. 38 * This is limited by h/w ring max size. 39 * As this is not a power of 2 it does not work with nss offload so the 40 * nearest available size which is power of 2 is 4096 chosen for nss 41 */ 42 43 #define WLAN_CFG_TX_RING_MASK_0 BIT(0) 44 #define WLAN_CFG_TX_RING_MASK_1 BIT(1) 45 #define WLAN_CFG_TX_RING_MASK_2 BIT(2) 46 #define WLAN_CFG_TX_RING_MASK_3 BIT(3) 47 #define WLAN_CFG_TX_RING_MASK_4 BIT(4) 48 #define WLAN_CFG_TX_RING_MASK_5 BIT(5) 49 #define WLAN_CFG_TX_RING_MASK_6 BIT(6) 50 #define WLAN_CFG_TX_RING_MASK_7 BIT(7) 51 52 53 #define WLAN_CFG_RX_MON_RING_MASK_0 0x1 54 #define WLAN_CFG_RX_MON_RING_MASK_1 0x2 55 #define WLAN_CFG_RX_MON_RING_MASK_2 0x4 56 #define WLAN_CFG_RX_MON_RING_MASK_3 0x0 57 58 #define WLAN_CFG_TX_MON_RING_MASK_0 BIT(0) 59 #define WLAN_CFG_TX_MON_RING_MASK_1 BIT(1) 60 61 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 0x1 62 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 0x2 63 #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2 0x4 64 65 #define WLAN_CFG_HOST2TXMON_RING_MASK_0 0x1 66 67 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 0x1 68 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 0x2 69 #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2 0x4 70 71 #define WLAN_CFG_RX_ERR_RING_MASK_0 0x1 72 #define WLAN_CFG_RX_ERR_RING_MASK_1 0x0 73 #define WLAN_CFG_RX_ERR_RING_MASK_2 0x0 74 #define WLAN_CFG_RX_ERR_RING_MASK_3 0x0 75 76 #define WLAN_CFG_RX_WBM_REL_RING_MASK_0 0x1 77 #define WLAN_CFG_RX_WBM_REL_RING_MASK_1 0x0 78 #define WLAN_CFG_RX_WBM_REL_RING_MASK_2 0x0 79 #define WLAN_CFG_RX_WBM_REL_RING_MASK_3 0x0 80 81 #define WLAN_CFG_REO_STATUS_RING_MASK_0 0x1 82 #define WLAN_CFG_REO_STATUS_RING_MASK_1 0x0 83 #define WLAN_CFG_REO_STATUS_RING_MASK_2 0x0 84 #define WLAN_CFG_REO_STATUS_RING_MASK_3 0x0 85 86 #define WLAN_CFG_RXDMA2HOST_RING_MASK_0 0x1 87 #define WLAN_CFG_RXDMA2HOST_RING_MASK_1 0x2 88 #define WLAN_CFG_RXDMA2HOST_RING_MASK_2 0x4 89 #define WLAN_CFG_RXDMA2HOST_RING_MASK_3 0x0 90 91 #define WLAN_CFG_HOST2RXDMA_RING_MASK_0 0x1 92 #define WLAN_CFG_HOST2RXDMA_RING_MASK_1 0x2 93 #define WLAN_CFG_HOST2RXDMA_RING_MASK_2 0x4 94 #define WLAN_CFG_HOST2RXDMA_RING_MASK_3 0x0 95 96 #define WLAN_CFG_UMAC_RESET_INTR_MASK_0 0x1 97 98 struct dp_int_mask_assignment { 99 uint8_t tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 100 uint8_t rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 101 uint8_t rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 102 uint8_t host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 103 uint8_t rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 104 uint8_t host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 105 uint8_t rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 106 uint8_t rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 107 uint8_t rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 108 uint8_t reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 109 uint8_t rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 110 uint8_t rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 111 uint8_t tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 112 uint8_t host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 113 uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 114 uint8_t umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS]; 115 }; 116 117 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) 118 /* 119 * For BE, there are 18 available MSI interrupts, assigned in the manner 120 * below. 121 * TX(5) + RX(8) + (REO ERR + WBM ERR)(1) + 122 * (REO status + RXDMA[0] + RXDMA[1])(1) + NEAR_Full_RX(2) + NEAR_Full_TX(1) 123 * For IPA_OFFLOAD enabled case, 2 TX/RX rings would be assigned to IPA. 124 */ 125 126 #ifdef CONFIG_BERYLLIUM 127 #ifdef IPA_OFFLOAD 128 /* 129 * NEAR-FULL IRQ mask should be updated, if any change is made to 130 * the below TX mask. 131 */ 132 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 133 [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4, 134 [2] = WLAN_CFG_TX_RING_MASK_2}; 135 #else /* !IPA_OFFLOAD */ 136 #ifdef QCA_WIFI_KIWI_V2 137 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 138 [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4, 139 [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_5, 140 [4] = WLAN_CFG_TX_RING_MASK_6}; 141 #else /* !QCA_WIFI_KIWI_V2 */ 142 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 143 [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4, 144 [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_6, 145 [4] = WLAN_CFG_TX_RING_MASK_7}; 146 #endif /* QCA_WIFI_KIWI_V2 */ 147 #endif /* IPA_OFFLOAD */ 148 149 static inline const 150 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 151 { 152 return &tx_ring_mask_msi[0]; 153 } 154 #else 155 static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 156 [0] = WLAN_CFG_TX_RING_MASK_0}; 157 158 #ifdef TX_MULTI_TCL 159 static const uint8_t multi_tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 160 [0] = WLAN_CFG_TX_RING_MASK_0, [4] = WLAN_CFG_TX_RING_MASK_2}; 161 162 #ifdef IPA_OFFLOAD 163 static inline const 164 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 165 { 166 if (cfg_ctx->ipa_enabled) 167 return &tx_ring_mask_msi[0]; 168 169 return &multi_tx_ring_mask_msi[0]; 170 } 171 #else 172 static inline const 173 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 174 { 175 return &multi_tx_ring_mask_msi[0]; 176 } 177 #endif /* IPA_OFFLOAD */ 178 #else 179 static inline const 180 uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx) 181 { 182 return &tx_ring_mask_msi[0]; 183 } 184 #endif /* TX_MULTI_TCL */ 185 #endif /* CONFIG_BERYLLIUM */ 186 187 #ifdef CONFIG_BERYLLIUM 188 #ifdef IPA_OFFLOAD 189 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 190 [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1, 191 [7] = WLAN_CFG_RX_RING_MASK_2, [9] = WLAN_CFG_RX_RING_MASK_4, 192 [10] = WLAN_CFG_RX_RING_MASK_5, [11] = WLAN_CFG_RX_RING_MASK_6}; 193 #else 194 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 195 [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1, 196 [7] = WLAN_CFG_RX_RING_MASK_2, [8] = WLAN_CFG_RX_RING_MASK_3, 197 [9] = WLAN_CFG_RX_RING_MASK_4, [10] = WLAN_CFG_RX_RING_MASK_5, 198 [11] = WLAN_CFG_RX_RING_MASK_6, [12] = WLAN_CFG_RX_RING_MASK_7}; 199 #endif /* IPA_OFFLOAD */ 200 #else /* !defined(CONFIG_BERYLLIUM) */ 201 #ifdef IPA_OFFLOAD 202 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 203 [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1, 204 [3] = WLAN_CFG_RX_RING_MASK_2}; 205 #else 206 static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 207 [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1, 208 [3] = WLAN_CFG_RX_RING_MASK_2 | WLAN_CFG_RX_RING_MASK_3}; 209 #endif 210 #endif /* CONFIG_BERYLLIUM */ 211 212 #ifdef CONFIG_BERYLLIUM 213 static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 214 [13] = WLAN_CFG_RXDMA2HOST_RING_MASK_0}; 215 #else 216 static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 217 [6] = WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 218 WLAN_CFG_RXDMA2HOST_RING_MASK_1}; 219 #endif /* CONFIG_BERYLLIUM */ 220 221 #ifdef CONFIG_BERYLLIUM 222 static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 223 [5] = WLAN_CFG_RX_MON_RING_MASK_0}; 224 #else 225 static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 226 [1] = WLAN_CFG_RX_MON_RING_MASK_0, [2] = WLAN_CFG_RX_MON_RING_MASK_1}; 227 #endif 228 229 static const uint8_t host2rxdma_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 230 231 static const uint8_t host2rxdma_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 232 233 static const uint8_t rxdma2host_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0}; 234 235 #ifdef CONFIG_BERYLLIUM 236 static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 237 [14] = WLAN_CFG_RX_ERR_RING_MASK_0}; 238 239 static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 240 [14] = WLAN_CFG_RX_WBM_REL_RING_MASK_0}; 241 242 static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 243 [13] = WLAN_CFG_REO_STATUS_RING_MASK_0}; 244 #else 245 static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 246 [6] = WLAN_CFG_RX_ERR_RING_MASK_0}; 247 static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 248 [6] = WLAN_CFG_RX_WBM_REL_RING_MASK_0}; 249 static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 250 [6] = WLAN_CFG_REO_STATUS_RING_MASK_0}; 251 #endif 252 253 #ifdef CONFIG_BERYLLIUM 254 #ifdef WLAN_FEATURE_NEAR_FULL_IRQ 255 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 256 [15] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1}; 257 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 258 [16] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1}; 259 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 260 [17] = WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK}; 261 #else 262 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 263 0 }; 264 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 265 0 }; 266 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 267 0 }; 268 #endif 269 #else 270 static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 271 0 }; 272 static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 273 0 }; 274 static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = { 275 0 }; 276 #endif 277 278 #else 279 /* Integrated configuration + 16 possible MSI configurations */ 280 #define NUM_INTERRUPT_COMBINATIONS 17 281 /* 282 * This structure contains the best possible mask assignment for a given 283 * number of MSIs available in the system. 284 */ 285 #ifdef IPA_OFFLOAD 286 static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = { 287 /* Interrupt assignment for integrated configuration */ 288 { 289 /* tx ring masks */ 290 { WLAN_CFG_TX_RING_MASK_0, 291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 292 /* rx ring masks */ 293 { 0, 0, 0, 0, 0, 0, 0, 294 WLAN_CFG_RX_RING_MASK_0, 295 WLAN_CFG_RX_RING_MASK_1, 296 WLAN_CFG_RX_RING_MASK_2, 297 0}, 298 /* rx mon ring masks */ 299 { 0, 0, 0, 0, 300 WLAN_CFG_RX_MON_RING_MASK_0, 301 WLAN_CFG_RX_MON_RING_MASK_1, 302 WLAN_CFG_RX_MON_RING_MASK_2, 303 0, 0, 0, 0}, 304 /* host2rxdma ring masks */ 305 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 306 /* rxdma2host ring masks */ 307 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 308 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 309 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 310 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 311 0, 0, 0, 0, 0, 0, 0}, 312 /* host2rxdma mon ring masks */ 313 { 0, 0, 0, 0, 314 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 315 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 316 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 317 0, 0, 0, 0}, 318 /* rxdma2host mon ring masks */ 319 { 0, 0, 0, 0, 320 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 321 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 322 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 323 0, 0, 0, 0}, 324 /* rx err ring masks */ 325 { WLAN_CFG_RX_ERR_RING_MASK_0, 326 WLAN_CFG_RX_ERR_RING_MASK_1, 327 WLAN_CFG_RX_ERR_RING_MASK_2, 328 WLAN_CFG_RX_ERR_RING_MASK_3, 329 0, 0, 0, 0, 0, 0, 0}, 330 /* rx wbm rel ring masks */ 331 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 332 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 333 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 334 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 335 0, 0, 0, 0, 0, 0, 0}, 336 /* reo status ring masks */ 337 { WLAN_CFG_REO_STATUS_RING_MASK_0, 338 WLAN_CFG_REO_STATUS_RING_MASK_1, 339 WLAN_CFG_REO_STATUS_RING_MASK_2, 340 WLAN_CFG_REO_STATUS_RING_MASK_3, 341 0, 0, 0, 0, 0, 0, 0}, 342 }, 343 /* Interrupt assignment for 1 MSI combination */ 344 { 345 /* tx ring masks */ 346 { WLAN_CFG_TX_RING_MASK_0, 347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 348 /* rx ring masks */ 349 { WLAN_CFG_RX_RING_MASK_0 | 350 WLAN_CFG_RX_RING_MASK_1 | 351 WLAN_CFG_RX_RING_MASK_2, 352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 353 /* rx mon ring masks */ 354 { WLAN_CFG_RX_MON_RING_MASK_0 | 355 WLAN_CFG_RX_MON_RING_MASK_1 | 356 WLAN_CFG_RX_MON_RING_MASK_2, 357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 358 /* host2rxdma ring masks */ 359 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 360 /* rxdma2host ring masks */ 361 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 362 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 363 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 364 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 366 /* host2rxdma mon ring masks */ 367 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 368 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 369 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 371 /* rxdma2host mon ring masks */ 372 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 373 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 374 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 375 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 376 /* rx err ring masks */ 377 { WLAN_CFG_RX_ERR_RING_MASK_0 | 378 WLAN_CFG_RX_ERR_RING_MASK_1 | 379 WLAN_CFG_RX_ERR_RING_MASK_2 | 380 WLAN_CFG_RX_ERR_RING_MASK_3, 381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 382 /* rx wbm rel ring masks */ 383 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 384 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 385 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 386 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 388 /* reo status ring masks */ 389 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 390 WLAN_CFG_REO_STATUS_RING_MASK_1 | 391 WLAN_CFG_REO_STATUS_RING_MASK_2 | 392 WLAN_CFG_REO_STATUS_RING_MASK_3, 393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 394 }, 395 /* Interrupt assignment for 2 MSI combination */ 396 { 397 /* tx ring masks */ 398 { WLAN_CFG_TX_RING_MASK_0, 399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 400 /* rx ring masks */ 401 { WLAN_CFG_RX_RING_MASK_0 | 402 WLAN_CFG_RX_RING_MASK_1, 403 WLAN_CFG_RX_RING_MASK_2, 404 0, 0, 0, 0, 0, 0, 0, 0, 0}, 405 /* rx mon ring masks */ 406 { WLAN_CFG_RX_MON_RING_MASK_0 | 407 WLAN_CFG_RX_MON_RING_MASK_1, 408 WLAN_CFG_RX_MON_RING_MASK_2, 409 0, 0, 0, 0, 0, 0, 0, 0, 0}, 410 /* host2rxdma ring masks */ 411 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 412 /* rxdma2host ring masks */ 413 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 414 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 415 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 416 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 417 0, 0, 0, 0, 0, 0, 0, 0, 0}, 418 /* host2rxdma mon ring masks */ 419 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 420 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 421 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 422 0, 0, 0, 0, 0, 0, 0, 0, 0}, 423 /* rxdma2host mon ring masks */ 424 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 425 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 426 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 427 0, 0, 0, 0, 0, 0, 0, 0, 0}, 428 /* rx err ring masks */ 429 { WLAN_CFG_RX_ERR_RING_MASK_0 | 430 WLAN_CFG_RX_ERR_RING_MASK_1, 431 WLAN_CFG_RX_ERR_RING_MASK_2 | 432 WLAN_CFG_RX_ERR_RING_MASK_3, 433 0, 0, 0, 0, 0, 0, 0, 0, 0}, 434 /* rx wbm rel ring masks */ 435 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 436 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 437 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 438 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 439 0, 0, 0, 0, 0, 0, 0, 0, 0}, 440 /* reo status ring masks */ 441 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 442 WLAN_CFG_REO_STATUS_RING_MASK_1, 443 WLAN_CFG_REO_STATUS_RING_MASK_2 | 444 WLAN_CFG_REO_STATUS_RING_MASK_3, 445 0, 0, 0, 0, 0, 0, 0, 0, 0}, 446 }, 447 /* Interrupt assignment for 3 MSI combination */ 448 { 449 /* tx ring masks */ 450 { WLAN_CFG_TX_RING_MASK_0, 451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 452 /* rx ring masks */ 453 { WLAN_CFG_RX_RING_MASK_0, 454 WLAN_CFG_RX_RING_MASK_1, 455 WLAN_CFG_RX_RING_MASK_2, 456 0, 0, 0, 0, 0, 0, 0, 0}, 457 /* rx mon ring masks */ 458 { 0, 0, 459 WLAN_CFG_RX_MON_RING_MASK_0 | 460 WLAN_CFG_RX_MON_RING_MASK_1 | 461 WLAN_CFG_RX_MON_RING_MASK_2, 462 0, 0, 0, 0, 0, 0, 0, 0}, 463 /* host2rxdma ring masks */ 464 { 0, 0, 0, 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 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 523 /* rxdma2host ring masks */ 524 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 525 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 526 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 527 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 528 0, 0, 0, 0, 0, 0, 0}, 529 /* host2rxdma mon ring masks */ 530 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 531 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 532 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 533 0, 0, 0, 0, 0, 0, 0, 0}, 534 /* rxdma2host mon ring masks */ 535 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 536 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 537 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 538 0, 0, 0, 0, 0, 0, 0, 0}, 539 /* rx err ring masks */ 540 { WLAN_CFG_RX_ERR_RING_MASK_0, 541 WLAN_CFG_RX_ERR_RING_MASK_1, 542 WLAN_CFG_RX_ERR_RING_MASK_2, 543 WLAN_CFG_RX_ERR_RING_MASK_3, 544 0, 0, 0, 0, 0, 0, 0}, 545 /* rx wbm rel ring masks */ 546 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 547 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 548 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 549 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 550 0, 0, 0, 0, 0, 0, 0}, 551 /* reo status ring masks */ 552 { WLAN_CFG_REO_STATUS_RING_MASK_0, 553 WLAN_CFG_REO_STATUS_RING_MASK_1, 554 WLAN_CFG_REO_STATUS_RING_MASK_2, 555 WLAN_CFG_REO_STATUS_RING_MASK_3, 556 0, 0, 0, 0, 0, 0, 0}, 557 }, 558 /* Interrupt assignment for 5 MSI combination */ 559 { 560 /* tx ring masks */ 561 { WLAN_CFG_TX_RING_MASK_0, 562 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 563 /* rx ring masks */ 564 { WLAN_CFG_RX_RING_MASK_0, 565 WLAN_CFG_RX_RING_MASK_1, 566 WLAN_CFG_RX_RING_MASK_2, 567 0, 0, 0, 0, 0, 0, 0, 0}, 568 /* rx mon ring masks */ 569 { 0, 0, 0, 0, 570 WLAN_CFG_RX_MON_RING_MASK_0 | 571 WLAN_CFG_RX_MON_RING_MASK_1 | 572 WLAN_CFG_RX_MON_RING_MASK_2, 573 0, 0, 0, 0, 0, 0}, 574 /* host2rxdma ring masks */ 575 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 576 /* rxdma2host ring masks */ 577 { 0, 0, 0, 0, 578 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 579 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 580 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 581 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 582 0, 0, 0, 0, 0, 0}, 583 /* host2rxdma mon ring masks */ 584 { 0, 0, 0, 0, 585 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 586 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 587 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 588 0, 0, 0, 0, 0, 0}, 589 /* rxdma2host mon ring masks */ 590 { 0, 0, 0, 0, 591 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 592 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 593 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 594 0, 0, 0, 0, 0, 0}, 595 /* rx err ring masks */ 596 { 0, 0, 0, 0, 597 WLAN_CFG_RX_ERR_RING_MASK_0 | 598 WLAN_CFG_RX_ERR_RING_MASK_1 | 599 WLAN_CFG_RX_ERR_RING_MASK_2 | 600 WLAN_CFG_RX_ERR_RING_MASK_3, 601 0, 0, 0, 0, 0, 0}, 602 /* rx wbm rel ring masks */ 603 { 0, 0, 0, 0, 604 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 605 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 606 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 607 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 608 0, 0, 0, 0, 0, 0}, 609 /* reo status ring masks */ 610 { 0, 0, 0, 0, 611 WLAN_CFG_REO_STATUS_RING_MASK_0 | 612 WLAN_CFG_REO_STATUS_RING_MASK_1 | 613 WLAN_CFG_REO_STATUS_RING_MASK_2 | 614 WLAN_CFG_REO_STATUS_RING_MASK_3, 615 0, 0, 0, 0, 0, 0}, 616 }, 617 /* Interrupt assignment for 6 MSI combination */ 618 { 619 /* tx ring masks */ 620 { WLAN_CFG_TX_RING_MASK_0, 621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 622 /* rx ring masks */ 623 { 0, 0, 624 WLAN_CFG_RX_RING_MASK_0, 625 WLAN_CFG_RX_RING_MASK_1, 626 WLAN_CFG_RX_RING_MASK_2, 627 0, 0, 0, 0, 0, 0}, 628 /* rx mon ring masks */ 629 { WLAN_CFG_RX_MON_RING_MASK_0, 630 WLAN_CFG_RX_MON_RING_MASK_1, 631 WLAN_CFG_RX_MON_RING_MASK_2, 632 0, 0, 0, 0, 0, 0, 0, 0}, 633 /* host2rxdma ring masks */ 634 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 635 /* rxdma2host ring masks */ 636 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 637 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 638 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 639 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 640 0, 0, 0, 0, 0, 0, 0}, 641 /* host2rxdma mon ring masks */ 642 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 643 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 644 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 645 0, 0, 0, 0, 0, 0, 0, 0}, 646 /* rxdma2host mon ring masks */ 647 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 648 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 649 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 650 0, 0, 0, 0, 0, 0, 0, 0}, 651 /* rx err ring masks */ 652 { WLAN_CFG_RX_ERR_RING_MASK_0, 653 WLAN_CFG_RX_ERR_RING_MASK_1, 654 WLAN_CFG_RX_ERR_RING_MASK_2, 655 WLAN_CFG_RX_ERR_RING_MASK_3, 656 0, 0, 0, 0, 0, 0, 0}, 657 /* rx wbm rel ring masks */ 658 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 659 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 660 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 661 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 662 0, 0, 0, 0, 0, 0, 0}, 663 /* reo status ring masks */ 664 { WLAN_CFG_REO_STATUS_RING_MASK_0, 665 WLAN_CFG_REO_STATUS_RING_MASK_1, 666 WLAN_CFG_REO_STATUS_RING_MASK_2, 667 WLAN_CFG_REO_STATUS_RING_MASK_3, 668 0, 0, 0, 0, 0, 0, 0}, 669 }, 670 /* Interrupt assignment for 7 MSI combination */ 671 { 672 /* tx ring masks */ 673 { WLAN_CFG_TX_RING_MASK_0, 674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 675 /* rx ring masks */ 676 { 0, 0, 0, 677 WLAN_CFG_RX_RING_MASK_0, 678 WLAN_CFG_RX_RING_MASK_1, 679 WLAN_CFG_RX_RING_MASK_2, 680 0, 0, 0, 0}, 681 /* rx mon ring masks */ 682 { 0, 0, 0, 683 WLAN_CFG_RX_MON_RING_MASK_0, 684 WLAN_CFG_RX_MON_RING_MASK_1, 685 WLAN_CFG_RX_MON_RING_MASK_2, 686 0, 0, 0, 0, 0}, 687 /* host2rxdma ring masks */ 688 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 689 /* rxdma2host ring masks */ 690 { 0, 0, 0, 691 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 692 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 693 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 694 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 695 0, 0, 0, 0}, 696 /* host2rxdma mon ring masks */ 697 { 0, 0, 0, 698 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 699 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 700 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 701 0, 0, 0, 0, 0}, 702 /* rxdma2host mon ring masks */ 703 { 0, 0, 0, 704 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 705 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 706 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 707 0, 0, 0, 0, 0}, 708 /* rx err ring masks */ 709 { 0, 0, 0, 710 WLAN_CFG_RX_ERR_RING_MASK_0, 711 WLAN_CFG_RX_ERR_RING_MASK_1, 712 WLAN_CFG_RX_ERR_RING_MASK_2, 713 WLAN_CFG_RX_ERR_RING_MASK_3, 714 0, 0, 0, 0}, 715 /* rx wbm rel ring masks */ 716 { 0, 0, 0, 717 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 718 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 719 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 720 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 721 0, 0, 0, 0}, 722 /* reo status ring masks */ 723 { 0, 0, 0, 724 WLAN_CFG_REO_STATUS_RING_MASK_0, 725 WLAN_CFG_REO_STATUS_RING_MASK_1, 726 WLAN_CFG_REO_STATUS_RING_MASK_2, 727 WLAN_CFG_REO_STATUS_RING_MASK_3, 728 0, 0, 0, 0}, 729 }, 730 /* Interrupt assignment for 8 MSI combination */ 731 { 732 /* tx ring masks */ 733 { WLAN_CFG_TX_RING_MASK_0, 734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 735 /* rx ring masks */ 736 { 0, 0, 0, 0, 737 WLAN_CFG_RX_RING_MASK_0, 738 WLAN_CFG_RX_RING_MASK_1, 739 WLAN_CFG_RX_RING_MASK_2, 740 0, 0, 0, 0}, 741 /* rx mon ring masks */ 742 { 0, 0, 0, 743 WLAN_CFG_RX_MON_RING_MASK_0, 744 WLAN_CFG_RX_MON_RING_MASK_1, 745 WLAN_CFG_RX_MON_RING_MASK_2, 746 0, 0, 0, 0, 0}, 747 /* host2rxdma ring masks */ 748 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 749 /* rxdma2host ring masks */ 750 { 0, 0, 0, 751 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 752 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 753 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 754 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 755 0, 0, 0, 0}, 756 /* host2rxdma mon ring masks */ 757 { 0, 0, 0, 758 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 759 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 760 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 761 0, 0, 0, 0, 0}, 762 /* rxdma2host mon ring masks */ 763 { 0, 0, 0, 764 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 765 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 766 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 767 0, 0, 0, 0, 0}, 768 /* rx err ring masks */ 769 { 0, 0, 0, 770 WLAN_CFG_RX_ERR_RING_MASK_0, 771 WLAN_CFG_RX_ERR_RING_MASK_1, 772 WLAN_CFG_RX_ERR_RING_MASK_2, 773 WLAN_CFG_RX_ERR_RING_MASK_3, 774 0, 0, 0, 0}, 775 /* rx wbm rel ring masks */ 776 { 0, 0, 0, 777 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 778 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 779 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 780 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 781 0, 0, 0, 0}, 782 /* reo status ring masks */ 783 { 0, 0, 0, 784 WLAN_CFG_REO_STATUS_RING_MASK_0, 785 WLAN_CFG_REO_STATUS_RING_MASK_1, 786 WLAN_CFG_REO_STATUS_RING_MASK_2, 787 WLAN_CFG_REO_STATUS_RING_MASK_3, 788 0, 0, 0, 0}, 789 }, 790 }; 791 #else 792 static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = { 793 /* Interrupt assignment for integrated configuration */ 794 { 795 /* tx ring masks */ 796 { WLAN_CFG_TX_RING_MASK_0, 797 WLAN_CFG_TX_RING_MASK_1, 798 WLAN_CFG_TX_RING_MASK_2, 799 WLAN_CFG_TX_RING_MASK_3, 800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 801 /* rx ring masks */ 802 { 0, 0, 0, 0, 0, 0, 0, 803 WLAN_CFG_RX_RING_MASK_0, 804 WLAN_CFG_RX_RING_MASK_1, 805 WLAN_CFG_RX_RING_MASK_2, 806 WLAN_CFG_RX_RING_MASK_3, 807 0, 0, 0, 0, 0}, 808 /* rx mon ring masks */ 809 { 0, 0, 0, 0, 810 WLAN_CFG_RX_MON_RING_MASK_0, 811 WLAN_CFG_RX_MON_RING_MASK_1, 812 WLAN_CFG_RX_MON_RING_MASK_2, 813 0, 0, 0, 0, 0, 0, 0, 0, 0}, 814 /* host2rxdma ring masks */ 815 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 816 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 817 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 818 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 820 /* rxdma2host ring masks */ 821 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 822 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 823 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 824 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 826 /* host2rxdma mon ring masks */ 827 { 0, 0, 0, 0, 828 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 829 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 830 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 831 0, 0, 0, 0, 0, 0, 0, 0, 0}, 832 /* rxdma2host mon ring masks */ 833 { 0, 0, 0, 0, 834 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 835 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 836 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 837 0, 0, 0, 0, 0, 0, 0, 0, 0}, 838 /* rx err ring masks */ 839 { WLAN_CFG_RX_ERR_RING_MASK_0, 840 WLAN_CFG_RX_ERR_RING_MASK_1, 841 WLAN_CFG_RX_ERR_RING_MASK_2, 842 WLAN_CFG_RX_ERR_RING_MASK_3, 843 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 844 /* rx wbm rel ring masks */ 845 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 846 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 847 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 848 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 850 /* reo status ring masks */ 851 { WLAN_CFG_REO_STATUS_RING_MASK_0, 852 WLAN_CFG_REO_STATUS_RING_MASK_1, 853 WLAN_CFG_REO_STATUS_RING_MASK_2, 854 WLAN_CFG_REO_STATUS_RING_MASK_3, 855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 856 /* rx_ring_near_full_irq mask */ 857 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 858 /* rx_ring_near_full_irq_2 mask */ 859 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 860 /* tx_ring_near_full_irq mask */ 861 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 862 /* host2txmon ring masks */ 863 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 864 /* tx mon ring masks */ 865 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 866 /* umac reset mask */ 867 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 868 }, 869 /* Interrupt assignment for 1 MSI combination */ 870 { 871 /* tx ring masks */ 872 { WLAN_CFG_TX_RING_MASK_0 | 873 WLAN_CFG_TX_RING_MASK_1 | 874 WLAN_CFG_TX_RING_MASK_2 | 875 WLAN_CFG_TX_RING_MASK_3, 876 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 877 /* rx ring masks */ 878 { WLAN_CFG_RX_RING_MASK_0 | 879 WLAN_CFG_RX_RING_MASK_1 | 880 WLAN_CFG_RX_RING_MASK_2 | 881 WLAN_CFG_RX_RING_MASK_3, 882 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 883 /* rx mon ring masks */ 884 { WLAN_CFG_RX_MON_RING_MASK_0 | 885 WLAN_CFG_RX_MON_RING_MASK_1 | 886 WLAN_CFG_RX_MON_RING_MASK_2, 887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 888 /* host2rxdma ring masks */ 889 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 890 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 891 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 892 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 894 /* rxdma2host ring masks */ 895 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 896 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 897 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 898 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 900 /* host2rxdma mon ring masks */ 901 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 902 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 903 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 905 /* rxdma2host mon ring masks */ 906 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 907 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 908 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 910 /* rx err ring masks */ 911 { WLAN_CFG_RX_ERR_RING_MASK_0 | 912 WLAN_CFG_RX_ERR_RING_MASK_1 | 913 WLAN_CFG_RX_ERR_RING_MASK_2 | 914 WLAN_CFG_RX_ERR_RING_MASK_3, 915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 916 /* rx wbm rel ring masks */ 917 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 918 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 919 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 920 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 922 /* reo status ring masks */ 923 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 924 WLAN_CFG_REO_STATUS_RING_MASK_1 | 925 WLAN_CFG_REO_STATUS_RING_MASK_2 | 926 WLAN_CFG_REO_STATUS_RING_MASK_3, 927 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 928 /* rx_ring_near_full_irq mask */ 929 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 930 /* rx_ring_near_full_irq_2 mask */ 931 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 932 /* tx_ring_near_full_irq mask */ 933 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 934 /* host2txmon ring masks */ 935 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 937 /* tx mon ring masks */ 938 { WLAN_CFG_TX_MON_RING_MASK_0 | 939 WLAN_CFG_TX_MON_RING_MASK_1, 940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 941 /* umac reset mask */ 942 {WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0, 943 0, 0, 0, 0, 0, 0, 0, 0}, 944 }, 945 /* Interrupt assignment for 2 MSI combination */ 946 { 947 /* tx ring masks */ 948 { WLAN_CFG_TX_RING_MASK_0 | 949 WLAN_CFG_TX_RING_MASK_1, 950 WLAN_CFG_TX_RING_MASK_2 | 951 WLAN_CFG_TX_RING_MASK_3, 952 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 953 /* rx ring masks */ 954 { WLAN_CFG_RX_RING_MASK_0 | 955 WLAN_CFG_RX_RING_MASK_1, 956 WLAN_CFG_RX_RING_MASK_2 | 957 WLAN_CFG_RX_RING_MASK_3, 958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 959 /* rx mon ring masks */ 960 { WLAN_CFG_RX_MON_RING_MASK_0 | 961 WLAN_CFG_RX_MON_RING_MASK_1, 962 WLAN_CFG_RX_MON_RING_MASK_2, 963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 964 /* host2rxdma ring masks */ 965 { WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 966 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 967 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 968 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 970 /* rxdma2host ring masks */ 971 { WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 972 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 973 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 974 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 975 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 976 /* host2rxdma mon ring masks */ 977 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 978 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 979 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 981 /* rxdma2host mon ring masks */ 982 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 983 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 984 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 985 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 986 /* rx err ring masks */ 987 { WLAN_CFG_RX_ERR_RING_MASK_0 | 988 WLAN_CFG_RX_ERR_RING_MASK_1, 989 WLAN_CFG_RX_ERR_RING_MASK_2 | 990 WLAN_CFG_RX_ERR_RING_MASK_3, 991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 992 /* rx wbm rel ring masks */ 993 { WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 994 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 995 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 996 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 998 /* reo status ring masks */ 999 { WLAN_CFG_REO_STATUS_RING_MASK_0 | 1000 WLAN_CFG_REO_STATUS_RING_MASK_1, 1001 WLAN_CFG_REO_STATUS_RING_MASK_2 | 1002 WLAN_CFG_REO_STATUS_RING_MASK_3, 1003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1004 /* rx_ring_near_full_irq mask */ 1005 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1006 /* rx_ring_near_full_irq_2 mask */ 1007 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1008 /* tx_ring_near_full_irq mask */ 1009 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1010 /* host2txmon ring masks */ 1011 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1012 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1013 /* tx mon ring masks */ 1014 { WLAN_CFG_TX_MON_RING_MASK_0, 1015 WLAN_CFG_TX_MON_RING_MASK_1, 1016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1017 /* umac reset mask */ 1018 {0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 1019 0, 0, 0, 0, 0, 0, 0, 0}, 1020 }, 1021 /* Interrupt assignment for 3 MSI combination */ 1022 { 1023 /* tx ring masks */ 1024 { WLAN_CFG_TX_RING_MASK_0 | 1025 WLAN_CFG_TX_RING_MASK_1, 1026 WLAN_CFG_TX_RING_MASK_2 | 1027 WLAN_CFG_TX_RING_MASK_3, 1028 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1029 /* rx ring masks */ 1030 { WLAN_CFG_RX_RING_MASK_0 | 1031 WLAN_CFG_RX_RING_MASK_1, 1032 WLAN_CFG_RX_RING_MASK_2 | 1033 WLAN_CFG_RX_RING_MASK_3, 1034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1035 /* rx mon ring masks */ 1036 { 0, 0, 1037 WLAN_CFG_RX_MON_RING_MASK_0 | 1038 WLAN_CFG_RX_MON_RING_MASK_1 | 1039 WLAN_CFG_RX_MON_RING_MASK_2, 1040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1041 /* host2rxdma ring masks */ 1042 { 0, 0, 1043 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 1044 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 1045 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 1046 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1048 /* rxdma2host ring masks */ 1049 { 0, 0, 1050 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 1051 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 1052 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 1053 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1054 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1055 /* host2rxdma mon ring masks */ 1056 { 0, 0, 1057 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 1058 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 1059 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1061 /* rxdma2host mon ring masks */ 1062 { 0, 0, 1063 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 1064 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 1065 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1067 /* rx err ring masks */ 1068 { 0, 0, 1069 WLAN_CFG_RX_ERR_RING_MASK_0 | 1070 WLAN_CFG_RX_ERR_RING_MASK_1 | 1071 WLAN_CFG_RX_ERR_RING_MASK_2 | 1072 WLAN_CFG_RX_ERR_RING_MASK_3, 1073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1074 /* rx wbm rel ring masks */ 1075 { 0, 0, 1076 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 1077 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 1078 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 1079 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1081 /* reo status ring masks */ 1082 { 0, 0, 1083 WLAN_CFG_REO_STATUS_RING_MASK_0 | 1084 WLAN_CFG_REO_STATUS_RING_MASK_1 | 1085 WLAN_CFG_REO_STATUS_RING_MASK_2 | 1086 WLAN_CFG_REO_STATUS_RING_MASK_3, 1087 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1088 /* rx_ring_near_full_irq mask */ 1089 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1090 /* rx_ring_near_full_irq_2 mask */ 1091 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1092 /* tx_ring_near_full_irq mask */ 1093 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1094 /* host2txmon ring masks */ 1095 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1097 /* tx mon ring masks */ 1098 { WLAN_CFG_TX_MON_RING_MASK_0, 1099 WLAN_CFG_TX_MON_RING_MASK_1, 1100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1101 /* umac reset mask */ 1102 {0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 1103 0, 0, 0, 0, 0, 0, 0, 0}, 1104 }, 1105 /* Interrupt assignment for 4 MSI combination */ 1106 { 1107 /* tx ring masks */ 1108 { WLAN_CFG_TX_RING_MASK_0, 1109 WLAN_CFG_TX_RING_MASK_1, 1110 WLAN_CFG_TX_RING_MASK_2, 1111 WLAN_CFG_TX_RING_MASK_3, 1112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1113 /* rx ring masks */ 1114 { WLAN_CFG_RX_RING_MASK_0, 1115 WLAN_CFG_RX_RING_MASK_1, 1116 WLAN_CFG_RX_RING_MASK_2, 1117 WLAN_CFG_RX_RING_MASK_3, 1118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1119 /* rx mon ring masks */ 1120 { WLAN_CFG_RX_MON_RING_MASK_0, 1121 WLAN_CFG_RX_MON_RING_MASK_1, 1122 WLAN_CFG_RX_MON_RING_MASK_2, 1123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1124 /* host2rxdma ring masks */ 1125 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1126 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1127 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1128 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1130 /* rxdma2host ring masks */ 1131 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1132 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1133 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1134 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1136 /* host2rxdma mon ring masks */ 1137 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1138 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1139 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1141 /* rxdma2host mon ring masks */ 1142 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1143 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1144 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1146 /* rx err ring masks */ 1147 { WLAN_CFG_RX_ERR_RING_MASK_0, 1148 WLAN_CFG_RX_ERR_RING_MASK_1, 1149 WLAN_CFG_RX_ERR_RING_MASK_2, 1150 WLAN_CFG_RX_ERR_RING_MASK_3, 1151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1152 /* rx wbm rel ring masks */ 1153 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1154 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1155 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1156 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1158 /* reo status ring masks */ 1159 { WLAN_CFG_REO_STATUS_RING_MASK_0, 1160 WLAN_CFG_REO_STATUS_RING_MASK_1, 1161 WLAN_CFG_REO_STATUS_RING_MASK_2, 1162 WLAN_CFG_REO_STATUS_RING_MASK_3, 1163 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1164 /* rx_ring_near_full_irq mask */ 1165 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1166 /* rx_ring_near_full_irq_2 mask */ 1167 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1168 /* tx_ring_near_full_irq mask */ 1169 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1170 /* host2txmon ring masks */ 1171 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1173 /* tx mon ring masks */ 1174 { WLAN_CFG_TX_MON_RING_MASK_0, 1175 WLAN_CFG_TX_MON_RING_MASK_1, 1176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1177 /* umac reset mask */ 1178 {0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 1179 0, 0, 0, 0, 0, 0, 0, 0}, 1180 }, 1181 /* Interrupt assignment for 5 MSI combination */ 1182 { 1183 /* tx ring masks */ 1184 { WLAN_CFG_TX_RING_MASK_0, 1185 WLAN_CFG_TX_RING_MASK_1, 1186 WLAN_CFG_TX_RING_MASK_2, 1187 WLAN_CFG_TX_RING_MASK_3, 1188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1189 /* rx ring masks */ 1190 { WLAN_CFG_RX_RING_MASK_0, 1191 WLAN_CFG_RX_RING_MASK_1, 1192 WLAN_CFG_RX_RING_MASK_2, 1193 WLAN_CFG_RX_RING_MASK_3, 1194 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1195 /* rx mon ring masks */ 1196 { 0, 0, 0, 0, 1197 WLAN_CFG_RX_MON_RING_MASK_0 | 1198 WLAN_CFG_RX_MON_RING_MASK_1 | 1199 WLAN_CFG_RX_MON_RING_MASK_2, 1200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1201 /* host2rxdma ring masks */ 1202 { 0, 0, 0, 0, 1203 WLAN_CFG_HOST2RXDMA_RING_MASK_0 | 1204 WLAN_CFG_HOST2RXDMA_RING_MASK_1 | 1205 WLAN_CFG_HOST2RXDMA_RING_MASK_2 | 1206 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1208 /* rxdma2host ring masks */ 1209 { 0, 0, 0, 0, 1210 WLAN_CFG_RXDMA2HOST_RING_MASK_0 | 1211 WLAN_CFG_RXDMA2HOST_RING_MASK_1 | 1212 WLAN_CFG_RXDMA2HOST_RING_MASK_2 | 1213 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1215 /* host2rxdma mon ring masks */ 1216 { 0, 0, 0, 0, 1217 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 | 1218 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 | 1219 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1221 /* rxdma2host mon ring masks */ 1222 { 0, 0, 0, 0, 1223 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 | 1224 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 | 1225 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1227 /* rx err ring masks */ 1228 { 0, 0, 0, 0, 1229 WLAN_CFG_RX_ERR_RING_MASK_0 | 1230 WLAN_CFG_RX_ERR_RING_MASK_1 | 1231 WLAN_CFG_RX_ERR_RING_MASK_2 | 1232 WLAN_CFG_RX_ERR_RING_MASK_3, 1233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1234 /* rx wbm rel ring masks */ 1235 { 0, 0, 0, 0, 1236 WLAN_CFG_RX_WBM_REL_RING_MASK_0 | 1237 WLAN_CFG_RX_WBM_REL_RING_MASK_1 | 1238 WLAN_CFG_RX_WBM_REL_RING_MASK_2 | 1239 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1241 /* reo status ring masks */ 1242 { 0, 0, 0, 0, 1243 WLAN_CFG_REO_STATUS_RING_MASK_0 | 1244 WLAN_CFG_REO_STATUS_RING_MASK_1 | 1245 WLAN_CFG_REO_STATUS_RING_MASK_2 | 1246 WLAN_CFG_REO_STATUS_RING_MASK_3, 1247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1248 /* rx_ring_near_full_irq mask */ 1249 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1250 /* rx_ring_near_full_irq_2 mask */ 1251 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1252 /* tx_ring_near_full_irq mask */ 1253 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1254 /* host2txmon ring masks */ 1255 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1257 /* tx mon ring masks */ 1258 { WLAN_CFG_TX_MON_RING_MASK_0, 1259 WLAN_CFG_TX_MON_RING_MASK_1, 1260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1261 /* umac reset mask */ 1262 {0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 1263 0, 0, 0, 0, 0, 0, 0, 0}, 1264 }, 1265 /* Interrupt assignment for 6 MSI combination */ 1266 { 1267 /* tx ring masks */ 1268 { WLAN_CFG_TX_RING_MASK_0, 1269 WLAN_CFG_TX_RING_MASK_1, 1270 WLAN_CFG_TX_RING_MASK_2, 1271 WLAN_CFG_TX_RING_MASK_3, 1272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1273 /* rx ring masks */ 1274 { 0, 0, 1275 WLAN_CFG_RX_RING_MASK_0, 1276 WLAN_CFG_RX_RING_MASK_1, 1277 WLAN_CFG_RX_RING_MASK_2, 1278 WLAN_CFG_RX_RING_MASK_3, 1279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1280 /* rx mon ring masks */ 1281 { WLAN_CFG_RX_MON_RING_MASK_0, 1282 WLAN_CFG_RX_MON_RING_MASK_1, 1283 WLAN_CFG_RX_MON_RING_MASK_2, 1284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1285 /* host2rxdma ring masks */ 1286 { WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1287 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1288 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1289 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1291 /* rxdma2host ring masks */ 1292 { WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1293 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1294 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1295 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1297 /* host2rxdma mon ring masks */ 1298 { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1299 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1300 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1302 /* rxdma2host mon ring masks */ 1303 { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1304 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1305 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1306 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1307 /* rx err ring masks */ 1308 { WLAN_CFG_RX_ERR_RING_MASK_0, 1309 WLAN_CFG_RX_ERR_RING_MASK_1, 1310 WLAN_CFG_RX_ERR_RING_MASK_2, 1311 WLAN_CFG_RX_ERR_RING_MASK_3, 1312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1313 /* rx wbm rel ring masks */ 1314 { WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1315 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1316 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1317 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1319 /* reo status ring masks */ 1320 { WLAN_CFG_REO_STATUS_RING_MASK_0, 1321 WLAN_CFG_REO_STATUS_RING_MASK_1, 1322 WLAN_CFG_REO_STATUS_RING_MASK_2, 1323 WLAN_CFG_REO_STATUS_RING_MASK_3, 1324 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1325 /* rx_ring_near_full_irq mask */ 1326 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1327 /* rx_ring_near_full_irq_2 mask */ 1328 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1329 /* tx_ring_near_full_irq mask */ 1330 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1331 /* host2txmon ring masks */ 1332 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1334 /* tx mon ring masks */ 1335 { WLAN_CFG_TX_MON_RING_MASK_0, 1336 WLAN_CFG_TX_MON_RING_MASK_1, 1337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1338 /* umac reset mask */ 1339 {0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 1340 0, 0, 0, 0, 0, 0, 0, 0}, 1341 }, 1342 /* Interrupt assignment for 7 MSI combination */ 1343 { 1344 /* tx ring masks */ 1345 { WLAN_CFG_TX_RING_MASK_0, 1346 WLAN_CFG_TX_RING_MASK_1, 1347 WLAN_CFG_TX_RING_MASK_2, 1348 WLAN_CFG_TX_RING_MASK_3, 1349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1350 /* rx ring masks */ 1351 { 0, 0, 0, 1352 WLAN_CFG_RX_RING_MASK_0, 1353 WLAN_CFG_RX_RING_MASK_1, 1354 WLAN_CFG_RX_RING_MASK_2, 1355 WLAN_CFG_RX_RING_MASK_3, 1356 0, 0, 0, 0, 0, 0, 0, 0}, 1357 /* rx mon ring masks */ 1358 { 0, 0, 0, 1359 WLAN_CFG_RX_MON_RING_MASK_0, 1360 WLAN_CFG_RX_MON_RING_MASK_1, 1361 WLAN_CFG_RX_MON_RING_MASK_2, 1362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1363 /* host2rxdma ring masks */ 1364 { 0, 0, 0, 1365 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1366 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1367 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1368 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1369 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1370 /* rxdma2host ring masks */ 1371 { 0, 0, 0, 1372 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1373 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1374 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1375 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1376 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1377 /* host2rxdma mon ring masks */ 1378 { 0, 0, 0, 1379 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1380 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1381 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1383 /* rxdma2host mon ring masks */ 1384 { 0, 0, 0, 1385 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1386 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1387 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1389 /* rx err ring masks */ 1390 { 0, 0, 0, 1391 WLAN_CFG_RX_ERR_RING_MASK_0, 1392 WLAN_CFG_RX_ERR_RING_MASK_1, 1393 WLAN_CFG_RX_ERR_RING_MASK_2, 1394 WLAN_CFG_RX_ERR_RING_MASK_3, 1395 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1396 /* rx wbm rel ring masks */ 1397 { 0, 0, 0, 1398 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1399 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1400 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1401 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1402 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1403 /* reo status ring masks */ 1404 { 0, 0, 0, 1405 WLAN_CFG_REO_STATUS_RING_MASK_0, 1406 WLAN_CFG_REO_STATUS_RING_MASK_1, 1407 WLAN_CFG_REO_STATUS_RING_MASK_2, 1408 WLAN_CFG_REO_STATUS_RING_MASK_3, 1409 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1410 /* rx_ring_near_full_irq mask */ 1411 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1412 /* rx_ring_near_full_irq_2 mask */ 1413 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1414 /* tx_ring_near_full_irq mask */ 1415 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1416 /* host2txmon ring masks */ 1417 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1419 /* tx mon ring masks */ 1420 { WLAN_CFG_TX_MON_RING_MASK_0, 1421 WLAN_CFG_TX_MON_RING_MASK_1, 1422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1423 /* umac reset mask */ 1424 {0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 1425 0, 0, 0, 0, 0, 0, 0, 0}, 1426 }, 1427 /* Interrupt assignment for 8 MSI combination */ 1428 { 1429 /* tx ring masks */ 1430 { WLAN_CFG_TX_RING_MASK_0, 1431 WLAN_CFG_TX_RING_MASK_1, 1432 WLAN_CFG_TX_RING_MASK_2, 1433 WLAN_CFG_TX_RING_MASK_3, 1434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1435 /* rx ring masks */ 1436 { 0, 0, 0, 0, 1437 WLAN_CFG_RX_RING_MASK_0, 1438 WLAN_CFG_RX_RING_MASK_1, 1439 WLAN_CFG_RX_RING_MASK_2, 1440 WLAN_CFG_RX_RING_MASK_3, 1441 0, 0, 0, 0, 0, 0, 0, 0}, 1442 /* rx mon ring masks */ 1443 { 0, 0, 0, 1444 WLAN_CFG_RX_MON_RING_MASK_0, 1445 WLAN_CFG_RX_MON_RING_MASK_1, 1446 WLAN_CFG_RX_MON_RING_MASK_2, 1447 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1448 /* host2rxdma ring masks */ 1449 { 0, 0, 0, 1450 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1451 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1452 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1453 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1454 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1455 /* rxdma2host ring masks */ 1456 { 0, 0, 0, 1457 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1458 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1459 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1460 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1461 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1462 /* host2rxdma mon ring masks */ 1463 { 0, 0, 0, 1464 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1465 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1466 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1468 /* rxdma2host mon ring masks */ 1469 { 0, 0, 0, 1470 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1471 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1472 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1474 /* rx err ring masks */ 1475 { 0, 0, 0, 1476 WLAN_CFG_RX_ERR_RING_MASK_0, 1477 WLAN_CFG_RX_ERR_RING_MASK_1, 1478 WLAN_CFG_RX_ERR_RING_MASK_2, 1479 WLAN_CFG_RX_ERR_RING_MASK_3, 1480 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1481 /* rx wbm rel ring masks */ 1482 { 0, 0, 0, 1483 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1484 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1485 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1486 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1487 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1488 /* reo status ring masks */ 1489 { 0, 0, 0, 1490 WLAN_CFG_REO_STATUS_RING_MASK_0, 1491 WLAN_CFG_REO_STATUS_RING_MASK_1, 1492 WLAN_CFG_REO_STATUS_RING_MASK_2, 1493 WLAN_CFG_REO_STATUS_RING_MASK_3, 1494 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1495 /* rx_ring_near_full_irq mask */ 1496 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1497 /* rx_ring_near_full_irq_2 mask */ 1498 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1499 /* tx_ring_near_full_irq mask */ 1500 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1501 /* host2txmon ring masks */ 1502 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1504 /* tx mon ring masks */ 1505 { WLAN_CFG_TX_MON_RING_MASK_0, 1506 WLAN_CFG_TX_MON_RING_MASK_1, 1507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1508 /* umac reset mask */ 1509 {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 1510 0, 0, 0, 0, 0, 0, 0, 0}, 1511 }, 1512 /* Interrupt assignment for 9 MSI combination */ 1513 { 1514 /* tx ring masks */ 1515 { WLAN_CFG_TX_RING_MASK_0, 1516 WLAN_CFG_TX_RING_MASK_1, 1517 WLAN_CFG_TX_RING_MASK_2, 1518 WLAN_CFG_TX_RING_MASK_3, 1519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1520 /* rx ring masks */ 1521 { 0, 0, 0, 0, 1522 WLAN_CFG_RX_RING_MASK_0, 1523 WLAN_CFG_RX_RING_MASK_1, 1524 WLAN_CFG_RX_RING_MASK_2, 1525 WLAN_CFG_RX_RING_MASK_3, 1526 0, 0, 0, 0, 0, 0, 0, 0}, 1527 /* rx mon ring masks */ 1528 { 0, 0, 0, 1529 WLAN_CFG_RX_MON_RING_MASK_0, 1530 WLAN_CFG_RX_MON_RING_MASK_1, 1531 WLAN_CFG_RX_MON_RING_MASK_2, 1532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1533 /* host2rxdma ring masks */ 1534 { 0, 0, 0, 1535 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1536 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1537 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1538 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1539 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1540 /* rxdma2host ring masks */ 1541 { 0, 0, 0, 1542 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1543 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1544 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1545 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1546 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1547 /* host2rxdma mon ring masks */ 1548 { 0, 0, 0, 1549 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1550 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1551 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1552 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1553 /* rxdma2host mon ring masks */ 1554 { 0, 0, 0, 1555 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1556 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1557 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1559 /* rx err ring masks */ 1560 { 0, 0, 0, 1561 WLAN_CFG_RX_ERR_RING_MASK_0, 1562 WLAN_CFG_RX_ERR_RING_MASK_1, 1563 WLAN_CFG_RX_ERR_RING_MASK_2, 1564 WLAN_CFG_RX_ERR_RING_MASK_3, 1565 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1566 /* rx wbm rel ring masks */ 1567 { 0, 0, 0, 1568 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1569 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1570 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1571 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1572 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1573 /* reo status ring masks */ 1574 { 0, 0, 0, 1575 WLAN_CFG_REO_STATUS_RING_MASK_0, 1576 WLAN_CFG_REO_STATUS_RING_MASK_1, 1577 WLAN_CFG_REO_STATUS_RING_MASK_2, 1578 WLAN_CFG_REO_STATUS_RING_MASK_3, 1579 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1580 /* rx_ring_near_full_irq mask */ 1581 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1582 /* rx_ring_near_full_irq_2 mask */ 1583 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1584 /* tx_ring_near_full_irq mask */ 1585 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1586 /* host2txmon ring masks */ 1587 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1589 /* tx mon ring masks */ 1590 { WLAN_CFG_TX_MON_RING_MASK_0, 1591 WLAN_CFG_TX_MON_RING_MASK_1, 1592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1593 /* umac reset mask */ 1594 {0, 0, 0, 0, 0, 0, 0, 0, 1595 WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0}, 1596 }, 1597 /* Interrupt assignment for 10 MSI combination */ 1598 { 1599 /* tx ring masks */ 1600 { WLAN_CFG_TX_RING_MASK_0, 1601 WLAN_CFG_TX_RING_MASK_1, 1602 WLAN_CFG_TX_RING_MASK_2, 1603 WLAN_CFG_TX_RING_MASK_3, 1604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1605 /* rx ring masks */ 1606 { 0, 0, 0, 0, 1607 WLAN_CFG_RX_RING_MASK_0, 1608 WLAN_CFG_RX_RING_MASK_1, 1609 WLAN_CFG_RX_RING_MASK_2, 1610 WLAN_CFG_RX_RING_MASK_3, 1611 0, 0, 0, 0, 0, 0, 0, 0}, 1612 /* rx mon ring masks */ 1613 { 0, 0, 0, 1614 WLAN_CFG_RX_MON_RING_MASK_0, 1615 WLAN_CFG_RX_MON_RING_MASK_1, 1616 WLAN_CFG_RX_MON_RING_MASK_2, 1617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1618 /* host2rxdma ring masks */ 1619 { 0, 0, 0, 1620 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1621 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1622 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1623 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1624 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1625 /* rxdma2host ring masks */ 1626 { 0, 0, 0, 1627 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1628 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1629 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1630 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1631 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1632 /* host2rxdma mon ring masks */ 1633 { 0, 0, 0, 1634 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1635 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1636 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1637 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1638 /* rxdma2host mon ring masks */ 1639 { 0, 0, 0, 1640 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1641 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1642 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1644 /* rx err ring masks */ 1645 { 0, 0, 0, 1646 WLAN_CFG_RX_ERR_RING_MASK_0, 1647 WLAN_CFG_RX_ERR_RING_MASK_1, 1648 WLAN_CFG_RX_ERR_RING_MASK_2, 1649 WLAN_CFG_RX_ERR_RING_MASK_3, 1650 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1651 /* rx wbm rel ring masks */ 1652 { 0, 0, 0, 1653 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1654 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1655 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1656 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1657 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1658 /* reo status ring masks */ 1659 { 0, 0, 0, 1660 WLAN_CFG_REO_STATUS_RING_MASK_0, 1661 WLAN_CFG_REO_STATUS_RING_MASK_1, 1662 WLAN_CFG_REO_STATUS_RING_MASK_2, 1663 WLAN_CFG_REO_STATUS_RING_MASK_3, 1664 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1665 /* rx_ring_near_full_irq mask */ 1666 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1667 /* rx_ring_near_full_irq_2 mask */ 1668 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1669 /* tx_ring_near_full_irq mask */ 1670 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1671 /* host2txmon ring masks */ 1672 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1674 /* tx mon ring masks */ 1675 { WLAN_CFG_TX_MON_RING_MASK_0, 1676 WLAN_CFG_TX_MON_RING_MASK_1, 1677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1678 /* umac reset mask */ 1679 {0, 0, 0, 0, 0, 0, 0, 0, 1680 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0}, 1681 }, 1682 /* Interrupt assignment for 11 MSI combination */ 1683 { 1684 /* tx ring masks */ 1685 { WLAN_CFG_TX_RING_MASK_0, 1686 WLAN_CFG_TX_RING_MASK_1, 1687 WLAN_CFG_TX_RING_MASK_2, 1688 WLAN_CFG_TX_RING_MASK_3, 1689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1690 /* rx ring masks */ 1691 { 0, 0, 0, 0, 1692 WLAN_CFG_RX_RING_MASK_0, 1693 WLAN_CFG_RX_RING_MASK_1, 1694 WLAN_CFG_RX_RING_MASK_2, 1695 WLAN_CFG_RX_RING_MASK_3, 1696 0, 0, 0, 0, 0, 0, 0, 0}, 1697 /* rx mon ring masks */ 1698 { 0, 0, 0, 1699 WLAN_CFG_RX_MON_RING_MASK_0, 1700 WLAN_CFG_RX_MON_RING_MASK_1, 1701 WLAN_CFG_RX_MON_RING_MASK_2, 1702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1703 /* host2rxdma ring masks */ 1704 { 0, 0, 0, 1705 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1706 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1707 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1708 WLAN_CFG_HOST2RXDMA_RING_MASK_3, 1709 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1710 /* rxdma2host ring masks */ 1711 { 0, 0, 0, 1712 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1713 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1714 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1715 WLAN_CFG_RXDMA2HOST_RING_MASK_3, 1716 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1717 /* host2rxdma mon ring masks */ 1718 { 0, 0, 0, 1719 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1720 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1721 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1723 /* rxdma2host mon ring masks */ 1724 { 0, 0, 0, 1725 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1726 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1727 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1729 /* rx err ring masks */ 1730 { 0, 0, 0, 1731 WLAN_CFG_RX_ERR_RING_MASK_0, 1732 WLAN_CFG_RX_ERR_RING_MASK_1, 1733 WLAN_CFG_RX_ERR_RING_MASK_2, 1734 WLAN_CFG_RX_ERR_RING_MASK_3, 1735 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1736 /* rx wbm rel ring masks */ 1737 { 0, 0, 0, 1738 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1739 WLAN_CFG_RX_WBM_REL_RING_MASK_1, 1740 WLAN_CFG_RX_WBM_REL_RING_MASK_2, 1741 WLAN_CFG_RX_WBM_REL_RING_MASK_3, 1742 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1743 /* reo status ring masks */ 1744 { 0, 0, 0, 1745 WLAN_CFG_REO_STATUS_RING_MASK_0, 1746 WLAN_CFG_REO_STATUS_RING_MASK_1, 1747 WLAN_CFG_REO_STATUS_RING_MASK_2, 1748 WLAN_CFG_REO_STATUS_RING_MASK_3, 1749 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1750 /* rx_ring_near_full_irq mask */ 1751 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1752 /* rx_ring_near_full_irq_2 mask */ 1753 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1754 /* tx_ring_near_full_irq mask */ 1755 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1756 /* host2txmon ring masks */ 1757 { WLAN_CFG_HOST2TXMON_RING_MASK_0, 1758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1759 /* tx mon ring masks */ 1760 { WLAN_CFG_TX_MON_RING_MASK_0, 1761 WLAN_CFG_TX_MON_RING_MASK_1, 1762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1763 /* umac reset mask */ 1764 {0, 0, 0, 0, 0, 0, 0, 0, 1765 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0}, 1766 }, 1767 /* Interrupt assignment for 12 MSI combination */ 1768 { 1769 /* tx ring masks */ 1770 { WLAN_CFG_TX_RING_MASK_0, 1771 WLAN_CFG_TX_RING_MASK_1, 1772 WLAN_CFG_TX_RING_MASK_2, 1773 WLAN_CFG_TX_RING_MASK_3, 1774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1775 /* rx ring masks */ 1776 { 0, 0, 0, 0, 1777 WLAN_CFG_RX_RING_MASK_0, 1778 WLAN_CFG_RX_RING_MASK_1, 1779 WLAN_CFG_RX_RING_MASK_2, 1780 WLAN_CFG_RX_RING_MASK_3, 1781 0, 0, 0, 0, 0, 0, 0, 0}, 1782 /* rx mon ring masks */ 1783 { 0, 0, 0, 0, 0, 0, 0, 0, 1784 WLAN_CFG_RX_MON_RING_MASK_0, 1785 WLAN_CFG_RX_MON_RING_MASK_1, 1786 WLAN_CFG_RX_MON_RING_MASK_2, 1787 0, 0, 0, 0, 0}, 1788 /* host2rxdma ring masks */ 1789 { 0, 0, 0, 0, 0, 0, 0, 0, 1790 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1791 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1792 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1793 0, 0, 0, 0, 0}, 1794 /* rxdma2host ring masks */ 1795 { 0, 0, 0, 0, 0, 0, 0, 0, 1796 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1797 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1798 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1799 0, 0, 0, 0, 0}, 1800 /* host2rxdma mon ring masks */ 1801 { 0, 0, 0, 0, 0, 0, 0, 0, 1802 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1803 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1804 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1805 0, 0, 0, 0, 0}, 1806 /* rxdma2host mon ring masks */ 1807 { 0, 0, 0, 0, 0, 0, 0, 0, 1808 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1809 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1810 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1811 0, 0, 0, 0, 0}, 1812 /* rx err ring masks */ 1813 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1814 WLAN_CFG_RX_ERR_RING_MASK_0, 1815 0, 0, 0, 0}, 1816 /* rx wbm rel ring masks */ 1817 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1818 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1819 0, 0, 0, 0}, 1820 /* reo status ring masks */ 1821 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1822 WLAN_CFG_REO_STATUS_RING_MASK_0, 1823 0, 0, 0, 0}, 1824 /* rx_ring_near_full_irq mask */ 1825 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1826 /* rx_ring_near_full_irq_2 mask */ 1827 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1828 /* tx_ring_near_full_irq mask */ 1829 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1830 /* host2txmon ring masks */ 1831 { 0, 0, 0, 0, 0, 0, 0, 0, 1832 WLAN_CFG_HOST2TXMON_RING_MASK_0, 1833 0, 0, 0, 0, 0, 0, 0}, 1834 /* tx mon ring masks */ 1835 { 0, 0, 0, 0, 0, 0, 0, 0, 1836 WLAN_CFG_TX_MON_RING_MASK_0, 1837 WLAN_CFG_TX_MON_RING_MASK_1, 1838 0, 0, 0, 0, 0, 0}, 1839 /* umac reset mask */ 1840 {0, 0, 0, 0, 0, 0, 0, 0, 1841 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0}, 1842 }, 1843 /* Interrupt assignment for 13 MSI combination */ 1844 { 1845 /* tx ring masks */ 1846 { WLAN_CFG_TX_RING_MASK_0, 1847 WLAN_CFG_TX_RING_MASK_1, 1848 WLAN_CFG_TX_RING_MASK_2, 1849 WLAN_CFG_TX_RING_MASK_3, 1850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1851 /* rx ring masks */ 1852 { 0, 0, 0, 0, 1853 WLAN_CFG_RX_RING_MASK_0, 1854 WLAN_CFG_RX_RING_MASK_1, 1855 WLAN_CFG_RX_RING_MASK_2, 1856 WLAN_CFG_RX_RING_MASK_3, 1857 0, 0, 0, 0, 0, 0, 0, 0}, 1858 /* rx mon ring masks */ 1859 { 0, 0, 0, 0, 0, 0, 0, 0, 1860 WLAN_CFG_RX_MON_RING_MASK_0, 1861 WLAN_CFG_RX_MON_RING_MASK_1, 1862 WLAN_CFG_RX_MON_RING_MASK_2, 1863 0, 0, 0, 0, 0}, 1864 /* host2rxdma ring masks */ 1865 { 0, 0, 0, 0, 0, 0, 0, 0, 1866 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1867 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1868 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1869 0, 0, 0, 0, 0}, 1870 /* rxdma2host ring masks */ 1871 { 0, 0, 0, 0, 0, 0, 0, 0, 1872 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1873 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1874 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1875 0, 0, 0, 0, 0}, 1876 /* host2rxdma mon ring masks */ 1877 { 0, 0, 0, 0, 0, 0, 0, 0, 1878 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1879 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1880 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1881 0, 0, 0, 0, 0}, 1882 /* rxdma2host mon ring masks */ 1883 { 0, 0, 0, 0, 0, 0, 0, 0, 1884 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1885 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1886 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1887 0, 0, 0, 0, 0}, 1888 /* rx err ring masks */ 1889 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1890 WLAN_CFG_RX_ERR_RING_MASK_0, 1891 0, 0, 0, 0}, 1892 /* rx wbm rel ring masks */ 1893 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1894 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1895 0, 0, 0, 0}, 1896 /* reo status ring masks */ 1897 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1898 WLAN_CFG_REO_STATUS_RING_MASK_0, 1899 0, 0, 0, 0}, 1900 /* rx_ring_near_full_irq mask */ 1901 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1902 /* rx_ring_near_full_irq_2 mask */ 1903 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1904 /* tx_ring_near_full_irq mask */ 1905 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1906 /* host2txmon ring masks */ 1907 { 0, 0, 0, 0, 0, 0, 0, 0, 1908 WLAN_CFG_HOST2TXMON_RING_MASK_0, 1909 0, 0, 0, 0, 0, 0, 0}, 1910 /* tx mon ring masks */ 1911 { 0, 0, 0, 0, 0, 0, 0, 0, 1912 WLAN_CFG_TX_MON_RING_MASK_0, 1913 WLAN_CFG_TX_MON_RING_MASK_1, 1914 0, 0, 0, 0, 0, 0}, 1915 /* umac reset mask */ 1916 {0, 0, 0, 0, 0, 0, 0, 0, 1917 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0}, 1918 }, 1919 /* Interrupt assignment for 14 MSI combination */ 1920 { 1921 /* tx ring masks */ 1922 { WLAN_CFG_TX_RING_MASK_0, 1923 WLAN_CFG_TX_RING_MASK_1, 1924 WLAN_CFG_TX_RING_MASK_2, 1925 WLAN_CFG_TX_RING_MASK_3, 1926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1927 /* rx ring masks */ 1928 { 0, 0, 0, 0, 1929 WLAN_CFG_RX_RING_MASK_0, 1930 WLAN_CFG_RX_RING_MASK_1, 1931 WLAN_CFG_RX_RING_MASK_2, 1932 WLAN_CFG_RX_RING_MASK_3, 1933 0, 0, 0, 0, 0, 0, 0, 0}, 1934 /* rx mon ring masks */ 1935 { 0, 0, 0, 0, 0, 0, 0, 0, 1936 WLAN_CFG_RX_MON_RING_MASK_0, 1937 WLAN_CFG_RX_MON_RING_MASK_1, 1938 WLAN_CFG_RX_MON_RING_MASK_2, 1939 0, 0, 0, 0, 0}, 1940 /* host2rxdma ring masks */ 1941 { 0, 0, 0, 0, 0, 0, 0, 0, 1942 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 1943 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 1944 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 1945 0, 0, 0, 0, 0}, 1946 /* rxdma2host ring masks */ 1947 { 0, 0, 0, 0, 0, 0, 0, 0, 1948 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 1949 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 1950 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 1951 0, 0, 0, 0, 0}, 1952 /* host2rxdma mon ring masks */ 1953 { 0, 0, 0, 0, 0, 0, 0, 0, 1954 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 1955 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 1956 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 1957 0, 0, 0, 0, 0}, 1958 /* rxdma2host mon ring masks */ 1959 { 0, 0, 0, 0, 0, 0, 0, 0, 1960 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 1961 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 1962 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 1963 0, 0, 0, 0, 0}, 1964 /* rx err ring masks */ 1965 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1966 WLAN_CFG_RX_ERR_RING_MASK_0, 1967 0, 0, 0, 0}, 1968 /* rx wbm rel ring masks */ 1969 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1970 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 1971 0, 0, 0, 0}, 1972 /* reo status ring masks */ 1973 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1974 WLAN_CFG_REO_STATUS_RING_MASK_0, 1975 0, 0, 0, 0}, 1976 /* rx_ring_near_full_irq mask */ 1977 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1978 /* rx_ring_near_full_irq_2 mask */ 1979 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1980 /* tx_ring_near_full_irq mask */ 1981 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1982 /* host2txmon ring masks */ 1983 { 0, 0, 0, 0, 0, 0, 0, 0, 1984 WLAN_CFG_HOST2TXMON_RING_MASK_0, 1985 0, 0, 0, 0, 0, 0, 0}, 1986 /* tx mon ring masks */ 1987 { 0, 0, 0, 0, 0, 0, 0, 0, 1988 WLAN_CFG_TX_MON_RING_MASK_0, 1989 WLAN_CFG_TX_MON_RING_MASK_1, 1990 0, 0, 0, 0, 0, 0}, 1991 /* umac reset mask */ 1992 {0, 0, 0, 0, 0, 0, 0, 0, 1993 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0}, 1994 }, 1995 /* Interrupt assignment for 15 MSI combination */ 1996 { 1997 /* tx ring masks */ 1998 { WLAN_CFG_TX_RING_MASK_0, 1999 WLAN_CFG_TX_RING_MASK_1, 2000 WLAN_CFG_TX_RING_MASK_2, 2001 WLAN_CFG_TX_RING_MASK_3, 2002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2003 /* rx ring masks */ 2004 { 0, 0, 0, 0, 2005 WLAN_CFG_RX_RING_MASK_0, 2006 WLAN_CFG_RX_RING_MASK_1, 2007 WLAN_CFG_RX_RING_MASK_2, 2008 WLAN_CFG_RX_RING_MASK_3, 2009 0, 0, 0, 0, 0, 0, 0, 0}, 2010 /* rx mon ring masks */ 2011 { 0, 0, 0, 0, 0, 0, 0, 0, 2012 WLAN_CFG_RX_MON_RING_MASK_0, 2013 WLAN_CFG_RX_MON_RING_MASK_1, 2014 WLAN_CFG_RX_MON_RING_MASK_2, 2015 0, 0, 0, 0, 0}, 2016 /* host2rxdma ring masks */ 2017 { 0, 0, 0, 0, 0, 0, 0, 0, 2018 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 2019 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 2020 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 2021 0, 0, 0, 0, 0}, 2022 /* rxdma2host ring masks */ 2023 { 0, 0, 0, 0, 0, 0, 0, 0, 2024 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 2025 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 2026 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 2027 0, 0, 0, 0, 0}, 2028 /* host2rxdma mon ring masks */ 2029 { 0, 0, 0, 0, 0, 0, 0, 0, 2030 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 2031 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 2032 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 2033 0, 0, 0, 0, 0}, 2034 /* rxdma2host mon ring masks */ 2035 { 0, 0, 0, 0, 0, 0, 0, 0, 2036 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 2037 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 2038 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 2039 0, 0, 0, 0, 0}, 2040 /* rx err ring masks */ 2041 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2042 WLAN_CFG_RX_ERR_RING_MASK_0, 2043 0, 0, 0, 0}, 2044 /* rx wbm rel ring masks */ 2045 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2046 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 2047 0, 0, 0, 0}, 2048 /* reo status ring masks */ 2049 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2050 WLAN_CFG_REO_STATUS_RING_MASK_0, 2051 0, 0, 0, 0}, 2052 /* rx_ring_near_full_irq mask */ 2053 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2054 /* rx_ring_near_full_irq_2 mask */ 2055 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2056 /* tx_ring_near_full_irq mask */ 2057 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2058 /* host2txmon ring masks */ 2059 { 0, 0, 0, 0, 0, 0, 0, 0, 2060 WLAN_CFG_HOST2TXMON_RING_MASK_0, 2061 0, 0, 0, 0, 0, 0, 0}, 2062 /* tx mon ring masks */ 2063 { 0, 0, 0, 0, 0, 0, 0, 0, 2064 WLAN_CFG_TX_MON_RING_MASK_0, 2065 WLAN_CFG_TX_MON_RING_MASK_1, 2066 0, 0, 0, 0, 0, 0}, 2067 /* umac reset mask */ 2068 {0, 0, 0, 0, 0, 0, 0, 0, 2069 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0}, 2070 }, 2071 /* Interrupt assignment for 16 MSI combination */ 2072 { 2073 /* tx ring masks */ 2074 { WLAN_CFG_TX_RING_MASK_0, 2075 WLAN_CFG_TX_RING_MASK_1, 2076 WLAN_CFG_TX_RING_MASK_2, 2077 WLAN_CFG_TX_RING_MASK_3, 2078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2079 /* rx ring masks */ 2080 { 0, 0, 0, 0, 2081 WLAN_CFG_RX_RING_MASK_0, 2082 WLAN_CFG_RX_RING_MASK_1, 2083 WLAN_CFG_RX_RING_MASK_2, 2084 WLAN_CFG_RX_RING_MASK_3, 2085 0, 0, 0, 0, 0, 0, 0, 0}, 2086 /* rx mon ring masks */ 2087 { 0, 0, 0, 0, 0, 0, 0, 0, 2088 WLAN_CFG_RX_MON_RING_MASK_0, 2089 WLAN_CFG_RX_MON_RING_MASK_1, 2090 WLAN_CFG_RX_MON_RING_MASK_2, 2091 0, 0, 0, 0, 0}, 2092 /* host2rxdma ring masks */ 2093 { 0, 0, 0, 0, 0, 0, 0, 0, 2094 WLAN_CFG_HOST2RXDMA_RING_MASK_0, 2095 WLAN_CFG_HOST2RXDMA_RING_MASK_1, 2096 WLAN_CFG_HOST2RXDMA_RING_MASK_2, 2097 0, 0, 0, 0, 0}, 2098 /* rxdma2host ring masks */ 2099 { 0, 0, 0, 0, 0, 0, 0, 0, 2100 WLAN_CFG_RXDMA2HOST_RING_MASK_0, 2101 WLAN_CFG_RXDMA2HOST_RING_MASK_1, 2102 WLAN_CFG_RXDMA2HOST_RING_MASK_2, 2103 0, 0, 0, 0, 0}, 2104 /* host2rxdma mon ring masks */ 2105 { 0, 0, 0, 0, 0, 0, 0, 0, 2106 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0, 2107 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1, 2108 WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2, 2109 0, 0, 0, 0, 0}, 2110 /* rxdma2host mon ring masks */ 2111 { 0, 0, 0, 0, 0, 0, 0, 0, 2112 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0, 2113 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1, 2114 WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2, 2115 0, 0, 0, 0, 0}, 2116 /* rx err ring masks */ 2117 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2118 WLAN_CFG_RX_ERR_RING_MASK_0, 2119 0, 0, 0, 0}, 2120 /* rx wbm rel ring masks */ 2121 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2122 WLAN_CFG_RX_WBM_REL_RING_MASK_0, 2123 0, 0, 0, 0}, 2124 /* reo status ring masks */ 2125 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2126 WLAN_CFG_REO_STATUS_RING_MASK_0, 2127 0, 0, 0, 0}, 2128 /* rx_ring_near_full_irq mask */ 2129 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2130 /* rx_ring_near_full_irq_2 mask */ 2131 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2132 /* tx_ring_near_full_irq mask */ 2133 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2134 /* host2txmon ring masks */ 2135 { 0, 0, 0, 0, 0, 0, 0, 0, 2136 WLAN_CFG_HOST2TXMON_RING_MASK_0, 2137 0, 0, 0, 0, 0, 0, 0}, 2138 /* tx mon ring masks */ 2139 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2140 WLAN_CFG_TX_MON_RING_MASK_0, 2141 WLAN_CFG_TX_MON_RING_MASK_1, 2142 0, 0, 0, 0, 0}, 2143 /* umac reset mask */ 2144 {0, 0, 0, 0, 0, 0, 0, 0, 2145 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0}, 2146 }, 2147 }; 2148 #endif 2149 #endif 2150 2151 /** 2152 * g_wlan_srng_cfg[] - Per ring_type specific configuration 2153 * 2154 */ 2155 struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES]; 2156 2157 /* REO_DST ring configuration */ 2158 struct wlan_srng_cfg wlan_srng_reo_cfg = { 2159 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING, 2160 .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING, 2161 .low_threshold = 0, 2162 }; 2163 2164 /* WBM2SW_RELEASE ring configuration */ 2165 struct wlan_srng_cfg wlan_srng_wbm_release_cfg = { 2166 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING, 2167 .batch_count_threshold = 0, 2168 .low_threshold = 0, 2169 }; 2170 2171 /* RXDMA_BUF ring configuration */ 2172 struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = { 2173 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 2174 .batch_count_threshold = 0, 2175 .low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3, 2176 }; 2177 2178 /* RXDMA_MONITOR_BUF ring configuration */ 2179 struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = { 2180 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 2181 .batch_count_threshold = 0, 2182 .low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3, 2183 }; 2184 2185 /* RXDMA_MONITOR_STATUS ring configuration */ 2186 #ifdef DP_CON_MON_MSI_ENABLED 2187 /* 2188 * Configure batch count threshold as 1 to enable interrupt 2189 * when HW updated TP (monitor status buffer DMA is done), 2190 * then host could reap monitor status srng. timer threshold 2191 * based interrupt is only used for low threshold interrupt which 2192 * can not be used for monitor status buffer reaping directly 2193 * unless configure low threshold value to a big value, perhaps 2194 * (number of entries - 2). 2195 */ 2196 struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = { 2197 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 2198 .batch_count_threshold = 1, 2199 .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3, 2200 }; 2201 #else 2202 struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = { 2203 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX, 2204 .batch_count_threshold = 0, 2205 .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3, 2206 }; 2207 #endif 2208 2209 /* TX_MONITOR_BUF ring configuration */ 2210 struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = { 2211 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX, 2212 .batch_count_threshold = 0, 2213 .low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3, 2214 }; 2215 2216 /* DEFAULT_CONFIG ring configuration */ 2217 struct wlan_srng_cfg wlan_srng_default_cfg = { 2218 .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER, 2219 .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER, 2220 .low_threshold = 0, 2221 }; 2222 2223 /* DEFAULT_CONFIG source ring configuration */ 2224 struct wlan_srng_cfg wlan_src_srng_default_cfg = { 2225 .timer_threshold = 0, 2226 .batch_count_threshold = 0, 2227 .low_threshold = 0, 2228 }; 2229 2230 void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg) 2231 { 2232 g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg; 2233 g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg; 2234 g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg; 2235 g_wlan_srng_cfg[REO_REINJECT] = wlan_src_srng_default_cfg; 2236 g_wlan_srng_cfg[REO_CMD] = wlan_src_srng_default_cfg; 2237 g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg; 2238 g_wlan_srng_cfg[TCL_DATA] = wlan_src_srng_default_cfg; 2239 g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_src_srng_default_cfg; 2240 g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg; 2241 g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_src_srng_default_cfg; 2242 g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_src_srng_default_cfg; 2243 g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg; 2244 g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg; 2245 g_wlan_srng_cfg[RXDMA_MONITOR_BUF] = 2246 wlan_srng_rxdma_monitor_buf_cfg; 2247 g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] = 2248 wlan_srng_rxdma_monitor_status_cfg; 2249 g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg; 2250 g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg; 2251 g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg; 2252 #ifdef WLAN_FEATURE_CIF_CFR 2253 g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg; 2254 #endif 2255 g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg; 2256 *wlan_cfg = g_wlan_srng_cfg; 2257 } 2258 2259 static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = { 2260 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, 2261 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, 2262 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, 2263 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, 2264 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa 2265 }; 2266 2267 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) 2268 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, 2269 int num_dp_msi, 2270 int interrupt_mode, 2271 bool is_monitor_mode) 2272 { int i = 0; 2273 const uint8_t *tx_ring_intr_mask = 2274 wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx); 2275 2276 for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) { 2277 wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_intr_mask[i]; 2278 if (wlan_cfg_ctx->int_tx_ring_mask[i]) 2279 wlan_cfg_ctx->tx_rings_grp_bitmap |= BIT(i); 2280 2281 wlan_cfg_ctx->int_rx_mon_ring_mask[i] = 2282 rx_mon_ring_mask_msi[i]; 2283 wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0; 2284 wlan_cfg_ctx->int_rx_err_ring_mask[i] = 2285 rx_err_ring_mask_msi[i]; 2286 wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] = 2287 rx_wbm_rel_ring_mask_msi[i]; 2288 wlan_cfg_ctx->int_reo_status_ring_mask[i] = 2289 reo_status_ring_mask_msi[i]; 2290 if (is_monitor_mode) { 2291 wlan_cfg_ctx->int_rx_ring_mask[i] = 0; 2292 if (interrupt_mode == DP_INTR_POLL) 2293 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0; 2294 else 2295 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 2296 rxdma2host_ring_mask_msi[i]; 2297 } else { 2298 wlan_cfg_ctx->int_rx_ring_mask[i] = 2299 rx_ring_mask_msi[i]; 2300 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 2301 rxdma2host_ring_mask_msi[i]; 2302 } 2303 wlan_cfg_ctx->int_host2rxdma_ring_mask[i] = 2304 host2rxdma_ring_mask_msi[i]; 2305 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = 2306 host2rxdma_mon_ring_mask_msi[i]; 2307 wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] = 2308 rxdma2host_mon_ring_mask_msi[i]; 2309 wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] = 2310 rx_ring_near_full_irq_1_mask_msi[i]; 2311 wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] = 2312 rx_ring_near_full_irq_2_mask_msi[i]; 2313 wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] = 2314 tx_ring_near_full_irq_mask_msi[i]; 2315 } 2316 } 2317 2318 #else 2319 2320 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, 2321 int num_dp_msi, 2322 int interrupt_mode, 2323 bool is_monitor_mode) 2324 { 2325 int i = 0; 2326 int interrupt_index = 0; 2327 int int_host2rxdma_mon_ring_mask; 2328 bool host2rxmon_mask_set = false; 2329 bool txmon_hw_support = false; 2330 2331 if(interrupt_mode == DP_INTR_INTEGRATED) { 2332 interrupt_index = 0; 2333 } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode == 2334 DP_INTR_POLL) { 2335 interrupt_index = num_dp_msi; 2336 } else { 2337 qdf_err("Interrupt mode %d", interrupt_mode); 2338 } 2339 2340 for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) { 2341 wlan_cfg_ctx->int_tx_ring_mask[i] = 2342 dp_mask_assignment[interrupt_index].tx_ring_mask[i]; 2343 wlan_cfg_ctx->int_rx_mon_ring_mask[i] = 2344 dp_mask_assignment[interrupt_index].rx_mon_ring_mask[i]; 2345 wlan_cfg_ctx->int_rx_err_ring_mask[i] = 2346 dp_mask_assignment[interrupt_index].rx_err_ring_mask[i]; 2347 wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] = 2348 dp_mask_assignment[interrupt_index].rx_wbm_rel_ring_mask[i]; 2349 wlan_cfg_ctx->int_reo_status_ring_mask[i] = 2350 dp_mask_assignment[interrupt_index].reo_status_ring_mask[i]; 2351 if (is_monitor_mode) { 2352 wlan_cfg_ctx->int_rx_ring_mask[i] = 0; 2353 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0; 2354 } else { 2355 wlan_cfg_ctx->int_rx_ring_mask[i] = 2356 dp_mask_assignment[interrupt_index].rx_ring_mask[i]; 2357 wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 2358 dp_mask_assignment[interrupt_index].rxdma2host_ring_mask[i]; 2359 } 2360 wlan_cfg_ctx->int_host2rxdma_ring_mask[i] = 2361 dp_mask_assignment[interrupt_index].host2rxdma_ring_mask[i]; 2362 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = 2363 dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i]; 2364 wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] = 2365 dp_mask_assignment[interrupt_index].rxdma2host_mon_ring_mask[i]; 2366 wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] = 2367 dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_1_mask[i]; 2368 wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] = 2369 dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_2_mask[i]; 2370 wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] = 2371 dp_mask_assignment[interrupt_index].tx_ring_near_full_irq_mask[i]; 2372 2373 txmon_hw_support = wlan_cfg_get_txmon_hw_support(wlan_cfg_ctx); 2374 if (txmon_hw_support) { 2375 wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 2376 dp_mask_assignment[interrupt_index].tx_mon_ring_mask[i]; 2377 wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 2378 dp_mask_assignment[interrupt_index].host2txmon_ring_mask[i]; 2379 int_host2rxdma_mon_ring_mask = 2380 dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i]; 2381 if (int_host2rxdma_mon_ring_mask && !host2rxmon_mask_set) { 2382 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[interrupt_index] = 2383 dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i]; 2384 host2rxmon_mask_set = true; 2385 } 2386 } else { 2387 wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0; 2388 wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 0; 2389 wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] = 2390 dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i]; 2391 } 2392 wlan_cfg_ctx->int_umac_reset_intr_mask[i] = 2393 dp_mask_assignment[interrupt_index].umac_reset_intr_mask[i]; 2394 } 2395 } 2396 #endif 2397 2398 #ifdef IPA_OFFLOAD 2399 2400 #define WLAN_CFG_IPA_ENABLE_MASK BIT(0) 2401 #ifdef IPA_WDI3_TX_TWO_PIPES 2402 /** 2403 * wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config 2404 * in dp soc cfg context 2405 * @psoc: Object manager psoc 2406 * @wlan_cfg_ctx: dp soc cfg ctx 2407 * 2408 * Return: None 2409 */ 2410 static void 2411 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2412 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2413 { 2414 if (ucfg_ipa_get_pld_enable()) { 2415 wlan_cfg_ctx->ipa_enabled = 2416 (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) & 2417 WLAN_CFG_IPA_ENABLE_MASK); 2418 dp_info("is IPA enabled from ini: %d", 2419 wlan_cfg_ctx->ipa_enabled); 2420 } else { 2421 wlan_cfg_ctx->ipa_enabled = false; 2422 dp_info("IPA disabled from platform driver"); 2423 } 2424 wlan_cfg_ctx->ipa_tx_ring_size = 2425 cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE); 2426 wlan_cfg_ctx->ipa_tx_comp_ring_size = 2427 cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE); 2428 wlan_cfg_ctx->ipa_tx_alt_ring_size = 2429 cfg_get(psoc, CFG_DP_IPA_TX_ALT_RING_SIZE); 2430 wlan_cfg_ctx->ipa_tx_alt_comp_ring_size = 2431 cfg_get(psoc, CFG_DP_IPA_TX_ALT_COMP_RING_SIZE); 2432 } 2433 #else /* !IPA_WDI3_TX_TWO_PIPES */ 2434 /** 2435 * wlan_soc_ipa_cfg_attach() - Update ipa config in dp soc 2436 * cfg context 2437 * @psoc - Object manager psoc 2438 * @wlan_cfg_ctx - dp soc cfg ctx 2439 * 2440 * Return: None 2441 */ 2442 static void 2443 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2444 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2445 { 2446 if (ucfg_ipa_get_pld_enable()) { 2447 wlan_cfg_ctx->ipa_enabled = 2448 (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) & 2449 WLAN_CFG_IPA_ENABLE_MASK); 2450 dp_info("is IPA enabled from ini: %d", 2451 wlan_cfg_ctx->ipa_enabled); 2452 } else { 2453 wlan_cfg_ctx->ipa_enabled = false; 2454 dp_info("IPA disabled from platform driver"); 2455 } 2456 wlan_cfg_ctx->ipa_tx_ring_size = 2457 cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE); 2458 wlan_cfg_ctx->ipa_tx_comp_ring_size = 2459 cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE); 2460 } 2461 #endif /* IPA_WDI3_TX_TWO_PIPES */ 2462 #else /* !IPA_OFFLOAD */ 2463 static inline void 2464 wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2465 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2466 { 2467 } 2468 #endif 2469 2470 #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION 2471 static void 2472 wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2473 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2474 { 2475 wlan_cfg_ctx->hw_cc_enabled = 2476 cfg_get(psoc, CFG_DP_HW_CC_ENABLE); 2477 } 2478 #else 2479 static void 2480 wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2481 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2482 { 2483 wlan_cfg_ctx->hw_cc_enabled = true; 2484 } 2485 #endif 2486 2487 #ifdef WLAN_SUPPORT_PPEDS 2488 /** 2489 * wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc 2490 * cfg context 2491 * @psoc - Object manager psoc 2492 * @wlan_cfg_ctx - dp soc cfg ctx 2493 * 2494 * Return: None 2495 */ 2496 static void 2497 wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2498 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2499 { 2500 wlan_cfg_ctx->ppe_enable = cfg_get(psoc, CFG_DP_PPE_ENABLE); 2501 wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING); 2502 wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING); 2503 wlan_cfg_ctx->ppe_release_ring = cfg_get(psoc, 2504 CFG_DP_PPE_RELEASE_RING); 2505 } 2506 #else 2507 static inline void 2508 wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2509 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2510 { 2511 } 2512 #endif 2513 2514 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 2515 /** 2516 * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set 2517 * 2518 * Return: position of LSB which is set 2519 */ 2520 static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val) 2521 { 2522 uint8_t pos = 0; 2523 2524 while (pos < 8) { 2525 if (val & (1 << pos)) 2526 return pos; 2527 2528 pos++; 2529 } 2530 2531 return 0; 2532 } 2533 2534 /** 2535 * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc 2536 * cfg context 2537 * @psoc - Object manager psoc 2538 * @wlan_cfg_ctx - dp soc cfg ctx 2539 * 2540 * Return: None 2541 */ 2542 static void 2543 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2544 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2545 { 2546 uint8_t rx_ring_map; 2547 2548 rx_ring_map = 2549 cfg_get(psoc, CFG_DP_MLO_CHIP0_RX_RING_MAP); 2550 wlan_cfg_ctx->mlo_chip_rx_ring_map[0] = rx_ring_map; 2551 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[0] = 2552 wlan_cfg_get_lsb_set_pos(rx_ring_map); 2553 wlan_cfg_ctx->lmac_peer_id_msb[0] = 1; 2554 2555 rx_ring_map = 2556 cfg_get(psoc, CFG_DP_MLO_CHIP1_RX_RING_MAP); 2557 wlan_cfg_ctx->mlo_chip_rx_ring_map[1] = rx_ring_map; 2558 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[1] = 2559 wlan_cfg_get_lsb_set_pos(rx_ring_map); 2560 wlan_cfg_ctx->lmac_peer_id_msb[1] = 2; 2561 2562 rx_ring_map = 2563 cfg_get(psoc, CFG_DP_MLO_CHIP2_RX_RING_MAP); 2564 wlan_cfg_ctx->mlo_chip_rx_ring_map[2] = rx_ring_map; 2565 wlan_cfg_ctx->mlo_chip_default_rx_ring_id[2] = 2566 wlan_cfg_get_lsb_set_pos(rx_ring_map); 2567 wlan_cfg_ctx->lmac_peer_id_msb[2] = 3; 2568 } 2569 #else 2570 static inline void 2571 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2572 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2573 { 2574 } 2575 #endif 2576 2577 #ifdef WLAN_FEATURE_11BE_MLO 2578 /** 2579 * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc 2580 * cfg context 2581 * @psoc - Object manager psoc 2582 * @wlan_cfg_ctx - dp soc cfg ctx 2583 * 2584 * Return: None 2585 */ 2586 static void 2587 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2588 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2589 { 2590 wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 2591 } 2592 #else 2593 static inline void 2594 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2595 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2596 { 2597 } 2598 #endif 2599 2600 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 2601 /** 2602 * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc 2603 * cfg context 2604 * @psoc - Object manager psoc 2605 * @wlan_cfg_ctx - dp soc cfg ctx 2606 * 2607 * Return: None 2608 */ 2609 static void 2610 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2611 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2612 { 2613 wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc, 2614 CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG); 2615 wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc, 2616 CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER); 2617 } 2618 #else 2619 static void 2620 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2621 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2622 { 2623 } 2624 #endif 2625 2626 #ifdef WLAN_TX_PKT_CAPTURE_ENH 2627 static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2628 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2629 { 2630 wlan_cfg_ctx->tx_capt_max_mem_allowed = 2631 cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024; 2632 } 2633 #else 2634 static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2635 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2636 { 2637 } 2638 #endif 2639 2640 /** 2641 * wlan_cfg_soc_attach() - Allocate and prepare SoC configuration 2642 * @psoc - Object manager psoc 2643 * Return: wlan_cfg_ctx - Handle to Configuration context 2644 */ 2645 struct wlan_cfg_dp_soc_ctxt * 2646 wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) 2647 { 2648 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx = 2649 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt)); 2650 uint32_t gro_bit_set; 2651 2652 if (!wlan_cfg_ctx) 2653 return NULL; 2654 2655 wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE; 2656 wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS; 2657 wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS); 2658 wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE); 2659 wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING); 2660 wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS); 2661 wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS); 2662 wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS); 2663 wlan_cfg_ctx->num_nss_reo_dest_rings = 2664 cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS); 2665 wlan_cfg_ctx->num_nss_tcl_data_rings = 2666 cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS); 2667 wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING); 2668 wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING); 2669 wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS; 2670 wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc, 2671 CFG_DP_TX_EXT_DESC_POOLS); 2672 wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC); 2673 wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN; 2674 wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC); 2675 wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE); 2676 wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID); 2677 2678 wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE); 2679 wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc, 2680 CFG_DP_TX_COMPL_RING_SIZE); 2681 2682 wlan_cfg_ctx->tx_comp_ring_size_nss = 2683 cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE); 2684 2685 wlan_cfg_ctx->int_batch_threshold_tx = 2686 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX); 2687 wlan_cfg_ctx->int_timer_threshold_tx = 2688 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX); 2689 wlan_cfg_ctx->int_batch_threshold_rx = 2690 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX); 2691 wlan_cfg_ctx->int_timer_threshold_rx = 2692 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX); 2693 wlan_cfg_ctx->int_batch_threshold_other = 2694 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER); 2695 wlan_cfg_ctx->int_timer_threshold_other = 2696 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER); 2697 wlan_cfg_ctx->pktlog_buffer_size = 2698 cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE); 2699 2700 /* This is default mapping and can be overridden by HW config 2701 * received from FW */ 2702 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0); 2703 if (MAX_PDEV_CNT > 1) 2704 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2); 2705 if (MAX_PDEV_CNT > 2) 2706 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1); 2707 2708 wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID); 2709 2710 wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH); 2711 wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO); 2712 wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO); 2713 wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG); 2714 gro_bit_set = cfg_get(psoc, CFG_DP_GRO); 2715 if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) { 2716 wlan_cfg_ctx->gro_enabled = true; 2717 if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO) 2718 wlan_cfg_ctx->tc_based_dynamic_gro = true; 2719 } 2720 wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO); 2721 wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM); 2722 wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM); 2723 wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE); 2724 wlan_cfg_ctx->peer_flow_ctrl_enabled = 2725 cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL); 2726 wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI); 2727 wlan_cfg_ctx->p2p_tcp_udp_checksumoffload = 2728 cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD); 2729 wlan_cfg_ctx->nan_tcp_udp_checksumoffload = 2730 cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD); 2731 wlan_cfg_ctx->tcp_udp_checksumoffload = 2732 cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD); 2733 wlan_cfg_ctx->legacy_mode_checksumoffload_disable = 2734 cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE); 2735 wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING); 2736 wlan_cfg_ctx->defrag_timeout_check = 2737 cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK); 2738 wlan_cfg_ctx->rx_defrag_min_timeout = 2739 cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT); 2740 2741 wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc, 2742 CFG_DP_WBM_RELEASE_RING); 2743 wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc, 2744 CFG_DP_TCL_CMD_CREDIT_RING); 2745 wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc, 2746 CFG_DP_TCL_STATUS_RING); 2747 wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc, 2748 CFG_DP_RX_DESTINATION_RING); 2749 wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc, 2750 CFG_DP_REO_REINJECT_RING); 2751 wlan_cfg_ctx->rx_release_ring = cfg_get(psoc, 2752 CFG_DP_RX_RELEASE_RING); 2753 wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc, 2754 CFG_DP_REO_EXCEPTION_RING); 2755 wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc, 2756 CFG_DP_REO_CMD_RING); 2757 wlan_cfg_ctx->reo_status_ring = cfg_get(psoc, 2758 CFG_DP_REO_STATUS_RING); 2759 wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc, 2760 CFG_DP_RXDMA_REFILL_RING); 2761 wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc, 2762 CFG_DP_TX_DESC_LIMIT_0); 2763 wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc, 2764 CFG_DP_TX_DESC_LIMIT_1); 2765 wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc, 2766 CFG_DP_TX_DESC_LIMIT_2); 2767 wlan_cfg_ctx->tx_device_limit = cfg_get(psoc, 2768 CFG_DP_TX_DEVICE_LIMIT); 2769 wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc, 2770 CFG_DP_TX_SW_INTERNODE_QUEUE); 2771 wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc, 2772 CFG_DP_RXDMA_ERR_DST_RING); 2773 wlan_cfg_ctx->enable_data_stall_detection = 2774 cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION); 2775 wlan_cfg_ctx->tx_flow_start_queue_offset = 2776 cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET); 2777 wlan_cfg_ctx->tx_flow_stop_queue_threshold = 2778 cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH); 2779 wlan_cfg_ctx->disable_intra_bss_fwd = 2780 cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION); 2781 wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc, 2782 CFG_DP_RX_SW_DESC_WEIGHT); 2783 wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc, 2784 CFG_DP_RX_SW_DESC_NUM); 2785 wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key; 2786 wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH; 2787 wlan_cfg_ctx->is_rx_flow_tag_enabled = 2788 cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE); 2789 wlan_cfg_ctx->is_rx_flow_search_table_per_pdev = 2790 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV); 2791 wlan_cfg_ctx->rx_flow_search_table_size = 2792 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE); 2793 wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled = 2794 cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE); 2795 wlan_cfg_ctx->mon_drop_thresh = 2796 cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD); 2797 wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE); 2798 wlan_cfg_ctx->is_rx_fisa_lru_del_enabled = 2799 cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE); 2800 wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP); 2801 wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS); 2802 wlan_cfg_ctx->is_rx_buff_pool_enabled = 2803 cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE); 2804 wlan_cfg_ctx->is_rx_refill_buff_pool_enabled = 2805 cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE); 2806 wlan_cfg_ctx->rx_pending_high_threshold = 2807 cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD); 2808 wlan_cfg_ctx->rx_pending_low_threshold = 2809 cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD); 2810 wlan_cfg_ctx->is_poll_mode_enabled = 2811 cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE); 2812 wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE); 2813 wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM); 2814 wlan_cfg_ctx->tx_per_pkt_vdev_id_check = 2815 cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK); 2816 wlan_cfg_ctx->radio0_rx_default_reo = 2817 cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO); 2818 wlan_cfg_ctx->radio1_rx_default_reo = 2819 cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO); 2820 wlan_cfg_ctx->radio2_rx_default_reo = 2821 cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO); 2822 wlan_cfg_ctx->wow_check_rx_pending_enable = 2823 cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING); 2824 wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc, 2825 CFG_DP_DELAY_MON_REPLENISH); 2826 wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc, 2827 CFG_DP_RXDMA_MONITOR_BUF_RING); 2828 wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc, 2829 CFG_DP_TX_MONITOR_BUF_RING); 2830 wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx); 2831 wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx); 2832 wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx); 2833 wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 2834 wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx); 2835 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 2836 wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) & 2837 PKT_CAPTURE_MODE_DATA_ONLY; 2838 #endif 2839 wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV; 2840 wlan_cfg_ctx->num_rxdma_status_rings_per_pdev = 2841 NUM_RXDMA_RINGS_PER_PDEV; 2842 wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx); 2843 wlan_cfg_ctx->mpdu_retry_threshold_1 = 2844 cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1); 2845 wlan_cfg_ctx->mpdu_retry_threshold_2 = 2846 cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2); 2847 2848 wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc, 2849 CFG_DP_NAPI_SCALE_FACTOR); 2850 return wlan_cfg_ctx; 2851 } 2852 2853 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2854 { 2855 qdf_mem_free(wlan_cfg_ctx); 2856 } 2857 2858 struct wlan_cfg_dp_pdev_ctxt * 2859 wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc) 2860 { 2861 struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx = 2862 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt)); 2863 2864 if (!wlan_cfg_ctx) 2865 return NULL; 2866 2867 wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc, 2868 CFG_DP_RXDMA_BUF_RING); 2869 wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc, 2870 CFG_DP_RXDMA_MONITOR_BUF_RING); 2871 wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc, 2872 CFG_DP_RXDMA_MONITOR_DST_RING); 2873 wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc, 2874 CFG_DP_TX_MONITOR_DST_RING); 2875 wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc, 2876 CFG_DP_RXDMA_MONITOR_STATUS_RING); 2877 wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc, 2878 CFG_DP_RXDMA_MONITOR_DESC_RING); 2879 wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV; 2880 2881 return wlan_cfg_ctx; 2882 } 2883 2884 void wlan_cfg_set_mon_delayed_replenish_entries( 2885 struct wlan_cfg_dp_soc_ctxt *cfg, 2886 uint32_t val) 2887 { 2888 cfg->delayed_replenish_entries = val; 2889 } 2890 2891 qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries); 2892 2893 int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg) 2894 { 2895 return cfg->delayed_replenish_entries; 2896 } 2897 2898 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx) 2899 { 2900 if (wlan_cfg_ctx) 2901 qdf_mem_free(wlan_cfg_ctx); 2902 } 2903 2904 int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg) 2905 { 2906 return cfg->mon_drop_thresh; 2907 } 2908 2909 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num) 2910 { 2911 cfg->num_int_ctxts = num; 2912 } 2913 2914 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2915 { 2916 cfg->max_peer_id = val; 2917 } 2918 2919 void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2920 { 2921 cfg->max_ast_idx = val; 2922 } 2923 2924 int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg) 2925 { 2926 return cfg->max_ast_idx; 2927 } 2928 2929 qdf_export_symbol(wlan_cfg_get_max_ast_idx); 2930 2931 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2932 int context, int mask) 2933 { 2934 cfg->int_tx_ring_mask[context] = mask; 2935 } 2936 2937 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2938 int context, int mask) 2939 { 2940 cfg->int_rx_ring_mask[context] = mask; 2941 } 2942 2943 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2944 int context, int mask) 2945 { 2946 cfg->int_rx_mon_ring_mask[context] = mask; 2947 } 2948 2949 void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2950 int context, int mask) 2951 { 2952 cfg->int_tx_mon_ring_mask[context] = mask; 2953 } 2954 2955 int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2956 int context) 2957 { 2958 return cfg->int_host2rxdma_mon_ring_mask[context]; 2959 } 2960 2961 void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2962 int context, int mask) 2963 { 2964 cfg->int_host2rxdma_mon_ring_mask[context] = mask; 2965 } 2966 2967 int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2968 int context) 2969 { 2970 return cfg->int_rxdma2host_mon_ring_mask[context]; 2971 } 2972 2973 void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2974 int context, int mask) 2975 { 2976 cfg->int_rxdma2host_mon_ring_mask[context] = mask; 2977 } 2978 2979 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2980 int context, int mask) 2981 { 2982 cfg->int_rxdma2host_ring_mask[context] = mask; 2983 } 2984 2985 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2986 int context) 2987 { 2988 return cfg->int_rxdma2host_ring_mask[context]; 2989 } 2990 2991 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2992 int context, int mask) 2993 { 2994 cfg->int_host2rxdma_ring_mask[context] = mask; 2995 } 2996 2997 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2998 int context) 2999 { 3000 return cfg->int_host2rxdma_ring_mask[context]; 3001 } 3002 3003 int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3004 int context) 3005 { 3006 return cfg->int_rx_ring_near_full_irq_1_mask[context]; 3007 } 3008 3009 int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3010 int context) 3011 { 3012 return cfg->int_rx_ring_near_full_irq_2_mask[context]; 3013 } 3014 3015 int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3016 int context) 3017 { 3018 return cfg->int_tx_ring_near_full_irq_mask[context]; 3019 } 3020 3021 void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 3022 int hw_macid) 3023 { 3024 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 3025 cfg->hw_macid[pdev_idx] = hw_macid; 3026 } 3027 3028 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx) 3029 { 3030 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 3031 return cfg->hw_macid[pdev_idx]; 3032 } 3033 3034 qdf_export_symbol(wlan_cfg_get_hw_mac_idx); 3035 3036 int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3037 int hw_macid) 3038 { 3039 int idx; 3040 3041 for (idx = 0; idx < MAX_PDEV_CNT; idx++) { 3042 if (cfg->hw_macid[idx] == hw_macid) 3043 return (idx + 1); 3044 } 3045 qdf_assert_always(idx < MAX_PDEV_CNT); 3046 return WLAN_INVALID_PDEV_ID; 3047 } 3048 3049 void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 3050 int hw_macid) 3051 { 3052 qdf_assert_always((pdev_idx < MAX_PDEV_CNT) || 3053 (pdev_idx == INVALID_PDEV_ID)); 3054 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 3055 cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx; 3056 } 3057 3058 int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid) 3059 { 3060 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 3061 return cfg->hw_macid_pdev_id_map[hw_macid]; 3062 } 3063 3064 qdf_export_symbol(wlan_cfg_get_pdev_idx); 3065 3066 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3067 int context, int mask) 3068 { 3069 cfg->int_ce_ring_mask[context] = mask; 3070 } 3071 3072 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context, 3073 int mask) 3074 { 3075 cfg->int_rx_ring_mask[context] = mask; 3076 } 3077 3078 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3079 int context, int mask) 3080 { 3081 return cfg->int_rx_err_ring_mask[context] = mask; 3082 } 3083 3084 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3085 int context, int mask) 3086 { 3087 return cfg->int_rx_wbm_rel_ring_mask[context] = mask; 3088 } 3089 3090 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3091 int context, int mask) 3092 { 3093 return cfg->int_reo_status_ring_mask[context] = mask; 3094 } 3095 3096 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg) 3097 { 3098 return cfg->num_int_ctxts; 3099 } 3100 3101 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3102 { 3103 return cfg->int_tx_ring_mask[context]; 3104 } 3105 3106 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3107 { 3108 return cfg->int_rx_ring_mask[context]; 3109 } 3110 3111 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3112 int context) 3113 { 3114 return cfg->int_rx_err_ring_mask[context]; 3115 } 3116 3117 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3118 int context) 3119 { 3120 return cfg->int_rx_wbm_rel_ring_mask[context]; 3121 } 3122 3123 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3124 int context) 3125 { 3126 return cfg->int_reo_status_ring_mask[context]; 3127 } 3128 3129 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3130 { 3131 return cfg->int_rx_mon_ring_mask[context]; 3132 } 3133 3134 #ifdef CONFIG_BERYLLIUM 3135 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3136 { 3137 return cfg->int_tx_mon_ring_mask[context]; 3138 } 3139 #else 3140 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3141 { 3142 return 0; 3143 } 3144 #endif 3145 3146 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3147 { 3148 return cfg->int_ce_ring_mask[context]; 3149 } 3150 3151 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg) 3152 { 3153 return cfg->max_clients; 3154 } 3155 3156 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3157 { 3158 return cfg->max_alloc_size; 3159 } 3160 3161 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3162 { 3163 return cfg->per_pdev_tx_ring; 3164 } 3165 3166 int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3167 int context) 3168 { 3169 return cfg->int_umac_reset_intr_mask[context]; 3170 } 3171 3172 uint32_t 3173 wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 3174 { 3175 return cfg->rx_pending_high_threshold; 3176 } 3177 3178 uint32_t 3179 wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 3180 { 3181 return cfg->rx_pending_low_threshold; 3182 } 3183 3184 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3185 { 3186 return cfg->per_pdev_lmac_ring; 3187 } 3188 3189 qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring); 3190 3191 #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL) 3192 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3193 { 3194 return 1; 3195 } 3196 3197 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3198 { 3199 return 1; 3200 } 3201 3202 #else 3203 3204 #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL) 3205 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3206 { 3207 if (!cfg->ipa_enabled) 3208 return cfg->num_tcl_data_rings; 3209 3210 return 1; 3211 } 3212 3213 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3214 { 3215 if (!cfg->ipa_enabled) 3216 return cfg->num_nss_tcl_data_rings; 3217 3218 return 1; 3219 } 3220 #else 3221 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3222 { 3223 return cfg->num_tcl_data_rings; 3224 } 3225 3226 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3227 { 3228 return cfg->num_nss_tcl_data_rings; 3229 } 3230 #endif 3231 #endif 3232 3233 int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3234 { 3235 return cfg->num_tx_comp_rings; 3236 } 3237 3238 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3239 { 3240 return cfg->tx_ring_size; 3241 } 3242 3243 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3244 { 3245 return cfg->tx_comp_ring_size; 3246 } 3247 3248 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3249 { 3250 return cfg->per_pdev_rx_ring; 3251 } 3252 3253 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3254 { 3255 return cfg->num_reo_dest_rings; 3256 } 3257 3258 int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3259 { 3260 return cfg->num_nss_reo_dest_rings; 3261 } 3262 3263 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg) 3264 { 3265 return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/ 3266 } 3267 3268 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 3269 { 3270 return cfg->num_tx_desc_pool; 3271 } 3272 3273 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 3274 { 3275 cfg->num_tx_desc_pool = num_pool; 3276 } 3277 3278 int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 3279 { 3280 return cfg->num_tx_ext_desc_pool; 3281 } 3282 3283 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 3284 { 3285 cfg->num_tx_ext_desc_pool = num_pool; 3286 } 3287 3288 int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3289 { 3290 return cfg->reo_dst_ring_size; 3291 } 3292 3293 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg, 3294 int reo_dst_ring_size) 3295 { 3296 cfg->reo_dst_ring_size = reo_dst_ring_size; 3297 } 3298 3299 void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg, 3300 bool raw_mode_war) 3301 { 3302 cfg->raw_mode_war = raw_mode_war; 3303 } 3304 3305 bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg) 3306 { 3307 return cfg->raw_mode_war; 3308 } 3309 3310 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3311 { 3312 return cfg->num_tx_desc; 3313 } 3314 3315 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc) 3316 { 3317 cfg->num_tx_desc = num_desc; 3318 } 3319 3320 int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3321 { 3322 return cfg->min_tx_desc; 3323 } 3324 3325 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3326 { 3327 return cfg->num_tx_ext_desc; 3328 } 3329 3330 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc) 3331 { 3332 cfg->num_tx_ext_desc = num_ext_desc; 3333 } 3334 3335 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg) 3336 { 3337 /* TODO: This should be calculated based on target capabilities */ 3338 return cfg->max_peer_id; 3339 } 3340 3341 int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3342 { 3343 return cfg->dma_mon_buf_ring_size; 3344 } 3345 3346 qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size); 3347 3348 int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3349 { 3350 return cfg->dma_rx_mon_dest_ring_size; 3351 } 3352 3353 qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size); 3354 3355 int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3356 { 3357 return cfg->dma_tx_mon_dest_ring_size; 3358 } 3359 3360 qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size); 3361 3362 int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3363 { 3364 return cfg->dma_mon_status_ring_size; 3365 } 3366 3367 qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size); 3368 3369 int 3370 wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3371 { 3372 return cfg->rxdma_monitor_desc_ring; 3373 } 3374 3375 qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size); 3376 3377 int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3378 { 3379 return cfg->rx_dma_buf_ring_size; 3380 } 3381 3382 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg) 3383 { 3384 return cfg->num_mac_rings; 3385 } 3386 3387 qdf_export_symbol(wlan_cfg_get_num_mac_rings); 3388 3389 bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3390 { 3391 return cfg->gro_enabled; 3392 } 3393 3394 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3395 { 3396 return cfg->lro_enabled; 3397 } 3398 3399 bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3400 { 3401 return cfg->ipa_enabled; 3402 } 3403 3404 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 3405 { 3406 cfg->rx_hash = val; 3407 } 3408 3409 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3410 { 3411 return cfg->rx_hash; 3412 } 3413 3414 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg) 3415 { 3416 return cfg->nss_enabled; 3417 } 3418 3419 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled) 3420 { 3421 cfg->nss_enabled = nss_enabled; 3422 } 3423 3424 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg) 3425 { 3426 return cfg->nss_cfg; 3427 } 3428 3429 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg) 3430 { 3431 cfg->nss_cfg = nss_cfg; 3432 if (cfg->nss_cfg) 3433 cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss; 3434 } 3435 3436 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 3437 { 3438 return cfg->int_batch_threshold_tx; 3439 } 3440 3441 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 3442 { 3443 return cfg->int_timer_threshold_tx; 3444 } 3445 3446 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 3447 { 3448 return cfg->int_batch_threshold_rx; 3449 } 3450 3451 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 3452 { 3453 return cfg->int_timer_threshold_rx; 3454 } 3455 3456 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 3457 { 3458 return cfg->int_batch_threshold_other; 3459 } 3460 3461 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 3462 { 3463 return cfg->int_timer_threshold_other; 3464 } 3465 3466 int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg) 3467 { 3468 return cfg->int_timer_threshold_mon; 3469 } 3470 3471 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3472 { 3473 return cfg->p2p_tcp_udp_checksumoffload; 3474 } 3475 3476 int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3477 { 3478 return cfg->nan_tcp_udp_checksumoffload; 3479 } 3480 3481 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3482 { 3483 return cfg->tcp_udp_checksumoffload; 3484 } 3485 3486 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg) 3487 { 3488 return cfg->rx_defrag_min_timeout; 3489 } 3490 3491 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg) 3492 { 3493 return cfg->defrag_timeout_check; 3494 } 3495 3496 int 3497 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3498 { 3499 return cfg->wbm_release_ring; 3500 } 3501 3502 int 3503 wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3504 { 3505 return cfg->tcl_cmd_credit_ring; 3506 } 3507 3508 int 3509 wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3510 { 3511 return cfg->tcl_status_ring; 3512 } 3513 3514 int 3515 wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3516 { 3517 return cfg->reo_reinject_ring; 3518 } 3519 3520 int 3521 wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3522 { 3523 return cfg->rx_release_ring; 3524 } 3525 3526 int 3527 wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3528 { 3529 return cfg->reo_exception_ring; 3530 } 3531 3532 int 3533 wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3534 { 3535 return cfg->reo_cmd_ring; 3536 } 3537 3538 int 3539 wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3540 { 3541 return cfg->reo_status_ring; 3542 } 3543 3544 int 3545 wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3546 { 3547 return cfg->rxdma_refill_ring; 3548 } 3549 3550 int 3551 wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg) 3552 { 3553 return cfg->tx_desc_limit_0; 3554 } 3555 3556 int 3557 wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg) 3558 { 3559 return cfg->tx_desc_limit_1; 3560 } 3561 3562 int 3563 wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg) 3564 { 3565 return cfg->tx_desc_limit_2; 3566 } 3567 3568 int 3569 wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg) 3570 { 3571 return cfg->tx_device_limit; 3572 } 3573 3574 int 3575 wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg) 3576 { 3577 return cfg->tx_sw_internode_queue; 3578 } 3579 3580 int 3581 wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3582 { 3583 return cfg->rxdma_err_dst_ring; 3584 } 3585 3586 int 3587 wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg) 3588 { 3589 return cfg->rx_sw_desc_weight; 3590 } 3591 3592 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight); 3593 3594 int 3595 wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg) 3596 { 3597 return cfg->rx_sw_desc_num; 3598 } 3599 3600 uint32_t 3601 wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg) 3602 { 3603 return cfg->reo_rings_mapping; 3604 } 3605 3606 bool 3607 wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg, 3608 enum cdp_capabilities dp_caps) 3609 { 3610 switch (dp_caps) { 3611 case CDP_CFG_DP_TSO: 3612 return cfg->tso_enabled; 3613 case CDP_CFG_DP_LRO: 3614 return cfg->lro_enabled; 3615 case CDP_CFG_DP_SG: 3616 return cfg->sg_enabled; 3617 case CDP_CFG_DP_GRO: 3618 return cfg->gro_enabled; 3619 case CDP_CFG_DP_OL_TX_CSUM: 3620 return cfg->ol_tx_csum_enabled; 3621 case CDP_CFG_DP_OL_RX_CSUM: 3622 return cfg->ol_rx_csum_enabled; 3623 case CDP_CFG_DP_RAWMODE: 3624 return cfg->rawmode_enabled; 3625 case CDP_CFG_DP_PEER_FLOW_CTRL: 3626 return cfg->peer_flow_ctrl_enabled; 3627 case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT: 3628 return cfg->notify_frame_support; 3629 default: 3630 return false; 3631 } 3632 } 3633 3634 void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg, 3635 bool val) 3636 { 3637 cfg->is_tso_desc_attach_defer = val; 3638 } 3639 3640 bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg) 3641 { 3642 return cfg->is_tso_desc_attach_defer; 3643 } 3644 3645 #ifdef QCA_LL_TX_FLOW_CONTROL_V2 3646 /** 3647 * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold 3648 * @cfg: config context 3649 * 3650 * Return: stop threshold 3651 */ 3652 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg) 3653 { 3654 return cfg->tx_flow_stop_queue_threshold; 3655 } 3656 3657 /** 3658 * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset 3659 * for TX to resume 3660 * @cfg: config context 3661 * 3662 * Return: stop threshold 3663 */ 3664 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg) 3665 { 3666 return cfg->tx_flow_start_queue_offset; 3667 } 3668 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ 3669 3670 void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 3671 bool val) 3672 { 3673 cfg->is_rx_flow_tag_enabled = val; 3674 } 3675 3676 uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg) 3677 { 3678 return cfg->rx_toeplitz_hash_key; 3679 } 3680 3681 uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg) 3682 { 3683 return cfg->rx_flow_max_search; 3684 } 3685 3686 bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3687 { 3688 return cfg->is_rx_flow_tag_enabled; 3689 } 3690 3691 qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled); 3692 3693 #ifdef WLAN_SUPPORT_RX_FISA 3694 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3695 { 3696 return (bool)(cfg->is_rx_fisa_enabled); 3697 } 3698 3699 bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3700 { 3701 return cfg->is_rx_fisa_lru_del_enabled; 3702 } 3703 #else 3704 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3705 { 3706 return false; 3707 } 3708 3709 bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3710 { 3711 return false; 3712 } 3713 #endif 3714 3715 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3716 { 3717 return (bool)(cfg->is_poll_mode_enabled); 3718 } 3719 3720 void 3721 wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg, 3722 bool val) 3723 { 3724 cfg->is_rx_flow_search_table_per_pdev = val; 3725 } 3726 3727 bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg) 3728 { 3729 return cfg->is_rx_flow_search_table_per_pdev; 3730 } 3731 3732 void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg, 3733 uint16_t val) 3734 { 3735 cfg->rx_flow_search_table_size = val; 3736 } 3737 3738 uint16_t 3739 wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3740 { 3741 return cfg->rx_flow_search_table_size; 3742 } 3743 3744 void 3745 wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 3746 bool val) 3747 { 3748 cfg->is_rx_mon_protocol_flow_tag_enabled = val; 3749 } 3750 3751 bool 3752 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3753 { 3754 return cfg->is_rx_mon_protocol_flow_tag_enabled; 3755 } 3756 3757 qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled); 3758 3759 void 3760 wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg, 3761 bool val) 3762 { 3763 cfg->tx_per_pkt_vdev_id_check = val; 3764 } 3765 3766 bool 3767 wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3768 { 3769 return cfg->tx_per_pkt_vdev_id_check; 3770 } 3771 3772 void 3773 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg, 3774 bool val) 3775 { 3776 cfg->pext_stats_enabled = val; 3777 } 3778 3779 bool 3780 wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3781 { 3782 return cfg->pext_stats_enabled; 3783 } 3784 3785 bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3786 { 3787 return cfg->fst_in_cmem; 3788 } 3789 3790 #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL 3791 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3792 { 3793 return cfg->is_rx_buff_pool_enabled; 3794 } 3795 3796 bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3797 { 3798 return cfg->is_rx_refill_buff_pool_enabled; 3799 } 3800 #else 3801 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3802 { 3803 return false; 3804 } 3805 3806 bool wlan_cfg_is_rx_refill_buffer_pool_enabled( 3807 struct wlan_cfg_dp_soc_ctxt *cfg) 3808 { 3809 return false; 3810 } 3811 #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */ 3812 3813 #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR 3814 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3815 { 3816 return (bool)(cfg->is_swlm_enabled); 3817 } 3818 #else 3819 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3820 { 3821 return false; 3822 } 3823 #endif 3824 uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3825 { 3826 return cfg->radio0_rx_default_reo; 3827 } 3828 3829 uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3830 { 3831 return cfg->radio1_rx_default_reo; 3832 } 3833 3834 uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3835 { 3836 return cfg->radio2_rx_default_reo; 3837 } 3838 3839 void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg) 3840 { 3841 cfg->rxdma1_enable = true; 3842 } 3843 3844 void 3845 wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, 3846 bool val) 3847 { 3848 cfg->delay_mon_replenish = val; 3849 } 3850 3851 bool 3852 wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg) 3853 { 3854 return cfg->delay_mon_replenish; 3855 } 3856 3857 qdf_export_symbol(wlan_cfg_is_delay_mon_replenish); 3858 3859 void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg) 3860 { 3861 dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,", 3862 cfg->delay_mon_replenish); 3863 dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d", 3864 cfg->reo_dst_ring_size, cfg->delayed_replenish_entries); 3865 } 3866 3867 #ifdef IPA_OFFLOAD 3868 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3869 { 3870 return cfg->ipa_tx_ring_size; 3871 } 3872 3873 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3874 { 3875 return cfg->ipa_tx_comp_ring_size; 3876 } 3877 3878 #ifdef IPA_WDI3_TX_TWO_PIPES 3879 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3880 { 3881 return cfg->ipa_tx_alt_ring_size; 3882 } 3883 3884 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3885 { 3886 return cfg->ipa_tx_alt_comp_ring_size; 3887 } 3888 3889 #else 3890 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3891 { 3892 return cfg->ipa_tx_ring_size; 3893 } 3894 3895 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3896 { 3897 return cfg->ipa_tx_comp_ring_size; 3898 } 3899 #endif 3900 #endif 3901 3902 #ifdef WLAN_SUPPORT_PPEDS 3903 bool 3904 wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3905 { 3906 return cfg->ppe_enable; 3907 } 3908 3909 int 3910 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3911 { 3912 return cfg->reo2ppe_ring; 3913 } 3914 3915 int 3916 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3917 { 3918 return cfg->ppe2tcl_ring; 3919 } 3920 3921 int 3922 wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3923 { 3924 return cfg->ppe_release_ring; 3925 } 3926 #endif 3927 3928 void 3929 wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 3930 struct wlan_dp_prealloc_cfg *cfg) 3931 { 3932 if (!ctrl_psoc || !cfg) 3933 return; 3934 3935 cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE); 3936 cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc, 3937 CFG_DP_TX_COMPL_RING_SIZE); 3938 cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc, 3939 CFG_DP_WBM_RELEASE_RING); 3940 cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc, 3941 CFG_DP_RXDMA_ERR_DST_RING); 3942 cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc, 3943 CFG_DP_REO_EXCEPTION_RING); 3944 cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC); 3945 cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC); 3946 } 3947 3948 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 3949 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg) 3950 { 3951 return cfg->pkt_capture_mode; 3952 } 3953 #endif 3954 3955 uint32_t 3956 wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3957 { 3958 return cfg->rx_mon_buf_ring_size; 3959 } 3960 3961 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size); 3962 3963 uint32_t 3964 wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3965 { 3966 return cfg->tx_mon_buf_ring_size; 3967 } 3968 3969 qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size); 3970 3971 uint8_t 3972 wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg) 3973 { 3974 return cfg->rx_rel_wbm2sw_ring_id; 3975 } 3976 3977 void 3978 wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3979 uint8_t wbm2sw_ring_id) 3980 { 3981 cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id; 3982 } 3983 3984 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 3985 uint8_t 3986 wlan_cfg_mlo_rx_ring_map_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3987 uint8_t chip_id) 3988 { 3989 return cfg->mlo_chip_rx_ring_map[chip_id]; 3990 } 3991 3992 uint8_t 3993 wlan_cfg_mlo_default_rx_ring_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3994 uint8_t chip_id) 3995 { 3996 return cfg->mlo_chip_default_rx_ring_id[chip_id]; 3997 } 3998 3999 uint8_t 4000 wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg, 4001 uint8_t chip_id) 4002 { 4003 return cfg->lmac_peer_id_msb[chip_id]; 4004 } 4005 #endif 4006 4007 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 4008 bool 4009 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4010 { 4011 return cfg->vdev_stats_hw_offload_config; 4012 } 4013 4014 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 4015 { 4016 return cfg->vdev_stats_hw_offload_timer; 4017 } 4018 4019 void 4020 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 4021 bool val) 4022 { 4023 cfg->vdev_stats_hw_offload_config = val; 4024 } 4025 #else 4026 bool 4027 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4028 { 4029 return false; 4030 } 4031 4032 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 4033 { 4034 return 0; 4035 } 4036 4037 void 4038 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 4039 bool val) 4040 {} 4041 #endif 4042 4043 #ifdef CONFIG_SAWF 4044 bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4045 { 4046 return cfg->sawf_enabled; 4047 } 4048 4049 void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 4050 { 4051 cfg->sawf_enabled = val; 4052 } 4053 #else 4054 bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4055 { 4056 return false; 4057 } 4058 4059 void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 4060 { 4061 } 4062 #endif 4063 4064 #ifdef CONFIG_BERYLLIUM 4065 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4066 int context) 4067 { 4068 return cfg->int_host2txmon_ring_mask[context]; 4069 } 4070 4071 qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask); 4072 4073 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4074 int context, int mask) 4075 { 4076 cfg->int_host2txmon_ring_mask[context] = mask; 4077 } 4078 #else 4079 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4080 int context) 4081 { 4082 return 0; 4083 } 4084 4085 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4086 int context, int mask) 4087 { 4088 } 4089 #endif 4090 4091 qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask); 4092 4093 void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg, 4094 bool txmon_hw_support) 4095 { 4096 cfg->txmon_hw_support = txmon_hw_support; 4097 } 4098 4099 bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg) 4100 { 4101 return cfg->txmon_hw_support; 4102 } 4103 4104 qdf_export_symbol(wlan_cfg_get_txmon_hw_support); 4105 4106 uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg) 4107 { 4108 return cfg->napi_scale_factor; 4109 } 4110