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 wlan_cfg_ctx->ppe_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC); 2506 } 2507 #else 2508 static inline void 2509 wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2510 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2511 { 2512 } 2513 #endif 2514 2515 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 2516 /** 2517 * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set 2518 * 2519 * Return: position of LSB which is set 2520 */ 2521 static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val) 2522 { 2523 uint8_t pos = 0; 2524 2525 while (pos < 8) { 2526 if (val & (1 << pos)) 2527 return pos; 2528 2529 pos++; 2530 } 2531 2532 return 0; 2533 } 2534 2535 /** 2536 * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc 2537 * cfg context 2538 * @psoc - Object manager psoc 2539 * @wlan_cfg_ctx - dp soc cfg ctx 2540 * 2541 * Return: None 2542 */ 2543 static void 2544 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2545 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2546 { 2547 uint8_t rx_ring_map; 2548 2549 rx_ring_map = 2550 cfg_get(psoc, CFG_DP_MLO_RX_RING_MAP); 2551 wlan_cfg_ctx->mlo_chip_rx_ring_map = rx_ring_map; 2552 } 2553 #else 2554 static inline void 2555 wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2556 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2557 { 2558 } 2559 #endif 2560 2561 #ifdef WLAN_FEATURE_11BE_MLO 2562 /** 2563 * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc 2564 * cfg context 2565 * @psoc - Object manager psoc 2566 * @wlan_cfg_ctx - dp soc cfg ctx 2567 * 2568 * Return: None 2569 */ 2570 static void 2571 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2572 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2573 { 2574 wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 2575 } 2576 #else 2577 static inline void 2578 wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2579 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2580 { 2581 } 2582 #endif 2583 2584 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 2585 /** 2586 * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc 2587 * cfg context 2588 * @psoc - Object manager psoc 2589 * @wlan_cfg_ctx - dp soc cfg ctx 2590 * 2591 * Return: None 2592 */ 2593 static void 2594 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2595 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2596 { 2597 wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc, 2598 CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG); 2599 wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc, 2600 CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER); 2601 } 2602 #else 2603 static void 2604 wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2605 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2606 { 2607 } 2608 #endif 2609 2610 #ifdef WLAN_TX_PKT_CAPTURE_ENH 2611 static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2612 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2613 { 2614 wlan_cfg_ctx->tx_capt_max_mem_allowed = 2615 cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024; 2616 } 2617 #else 2618 static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2619 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2620 { 2621 } 2622 #endif 2623 2624 void 2625 wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, 2626 struct cdp_ctrl_objmgr_psoc *psoc) 2627 { 2628 wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, 2629 CFG_DP_REO_RINGS_MAP); 2630 } 2631 2632 #ifdef CONFIG_SAWF_STATS 2633 /** 2634 * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc 2635 * cfg context 2636 * @psoc - Object manager psoc 2637 * @wlan_cfg_ctx - dp soc cfg ctx 2638 * 2639 * Return: None 2640 */ 2641 static void 2642 wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2643 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2644 { 2645 wlan_cfg_ctx->sawf_stats = cfg_get(psoc, CFG_DP_SAWF_STATS); 2646 } 2647 2648 uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg) 2649 { 2650 return cfg->sawf_stats; 2651 } 2652 2653 void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg, 2654 uint8_t val) 2655 { 2656 cfg->sawf_stats = val; 2657 } 2658 #else 2659 /** 2660 * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc 2661 * cfg context 2662 * @psoc - Object manager psoc 2663 * @wlan_cfg_ctx - dp soc cfg ctx 2664 * 2665 * Return: None 2666 */ 2667 static void 2668 wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc, 2669 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2670 { 2671 } 2672 2673 uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg) 2674 { 2675 return 0; 2676 } 2677 2678 void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg, 2679 uint8_t val) 2680 { 2681 } 2682 #endif /* CONFIG_SAWF_STATS */ 2683 2684 /** 2685 * wlan_cfg_soc_attach() - Allocate and prepare SoC configuration 2686 * @psoc - Object manager psoc 2687 * Return: wlan_cfg_ctx - Handle to Configuration context 2688 */ 2689 struct wlan_cfg_dp_soc_ctxt * 2690 wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) 2691 { 2692 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx = 2693 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt)); 2694 uint32_t gro_bit_set; 2695 2696 if (!wlan_cfg_ctx) 2697 return NULL; 2698 2699 wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE; 2700 wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS; 2701 wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS); 2702 wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE); 2703 wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING); 2704 wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS); 2705 wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS); 2706 wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS); 2707 wlan_cfg_ctx->num_nss_reo_dest_rings = 2708 cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS); 2709 wlan_cfg_ctx->num_nss_tcl_data_rings = 2710 cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS); 2711 wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING); 2712 wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING); 2713 wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS; 2714 wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc, 2715 CFG_DP_TX_EXT_DESC_POOLS); 2716 wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC); 2717 wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN; 2718 wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC); 2719 wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE); 2720 wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID); 2721 2722 wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE); 2723 wlan_cfg_ctx->time_control_bp = cfg_get(psoc, CFG_DP_TIME_CONTROL_BP); 2724 wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc, 2725 CFG_DP_TX_COMPL_RING_SIZE); 2726 2727 wlan_cfg_ctx->tx_comp_ring_size_nss = 2728 cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE); 2729 2730 wlan_cfg_ctx->int_batch_threshold_tx = 2731 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX); 2732 wlan_cfg_ctx->int_timer_threshold_tx = 2733 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX); 2734 wlan_cfg_ctx->int_batch_threshold_rx = 2735 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX); 2736 wlan_cfg_ctx->int_timer_threshold_rx = 2737 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX); 2738 wlan_cfg_ctx->int_batch_threshold_other = 2739 cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER); 2740 wlan_cfg_ctx->int_timer_threshold_other = 2741 cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER); 2742 wlan_cfg_ctx->pktlog_buffer_size = 2743 cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE); 2744 2745 /* This is default mapping and can be overridden by HW config 2746 * received from FW */ 2747 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0); 2748 if (MAX_PDEV_CNT > 1) 2749 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2); 2750 if (MAX_PDEV_CNT > 2) 2751 wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1); 2752 2753 wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID); 2754 2755 wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH); 2756 wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO); 2757 wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO); 2758 wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG); 2759 gro_bit_set = cfg_get(psoc, CFG_DP_GRO); 2760 if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) { 2761 wlan_cfg_ctx->gro_enabled = true; 2762 if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO) 2763 wlan_cfg_ctx->tc_based_dynamic_gro = true; 2764 } 2765 wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO); 2766 wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM); 2767 wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM); 2768 wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE); 2769 wlan_cfg_ctx->peer_flow_ctrl_enabled = 2770 cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL); 2771 wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI); 2772 wlan_cfg_ctx->p2p_tcp_udp_checksumoffload = 2773 cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD); 2774 wlan_cfg_ctx->nan_tcp_udp_checksumoffload = 2775 cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD); 2776 wlan_cfg_ctx->tcp_udp_checksumoffload = 2777 cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD); 2778 wlan_cfg_ctx->legacy_mode_checksumoffload_disable = 2779 cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE); 2780 wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING); 2781 wlan_cfg_ctx->defrag_timeout_check = 2782 cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK); 2783 wlan_cfg_ctx->rx_defrag_min_timeout = 2784 cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT); 2785 2786 wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc, 2787 CFG_DP_WBM_RELEASE_RING); 2788 wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc, 2789 CFG_DP_TCL_CMD_CREDIT_RING); 2790 wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc, 2791 CFG_DP_TCL_STATUS_RING); 2792 wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc, 2793 CFG_DP_RX_DESTINATION_RING); 2794 wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc, 2795 CFG_DP_REO_REINJECT_RING); 2796 wlan_cfg_ctx->rx_release_ring = cfg_get(psoc, 2797 CFG_DP_RX_RELEASE_RING); 2798 wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc, 2799 CFG_DP_REO_EXCEPTION_RING); 2800 wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc, 2801 CFG_DP_REO_CMD_RING); 2802 wlan_cfg_ctx->reo_status_ring = cfg_get(psoc, 2803 CFG_DP_REO_STATUS_RING); 2804 wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc, 2805 CFG_DP_RXDMA_REFILL_RING); 2806 wlan_cfg_ctx->rxdma_refill_lt_disable = 2807 cfg_get(psoc, 2808 CFG_DP_RXDMA_REFILL_LT_DISABLE); 2809 wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc, 2810 CFG_DP_TX_DESC_LIMIT_0); 2811 wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc, 2812 CFG_DP_TX_DESC_LIMIT_1); 2813 wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc, 2814 CFG_DP_TX_DESC_LIMIT_2); 2815 wlan_cfg_ctx->tx_device_limit = cfg_get(psoc, 2816 CFG_DP_TX_DEVICE_LIMIT); 2817 wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc, 2818 CFG_DP_TX_SW_INTERNODE_QUEUE); 2819 wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc, 2820 CFG_DP_RXDMA_ERR_DST_RING); 2821 wlan_cfg_ctx->enable_data_stall_detection = 2822 cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION); 2823 wlan_cfg_ctx->tx_flow_start_queue_offset = 2824 cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET); 2825 wlan_cfg_ctx->tx_flow_stop_queue_threshold = 2826 cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH); 2827 wlan_cfg_ctx->disable_intra_bss_fwd = 2828 cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION); 2829 wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc, 2830 CFG_DP_RX_SW_DESC_WEIGHT); 2831 wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc, 2832 CFG_DP_RX_SW_DESC_NUM); 2833 wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key; 2834 wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH; 2835 wlan_cfg_ctx->is_rx_flow_tag_enabled = 2836 cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE); 2837 wlan_cfg_ctx->is_rx_flow_search_table_per_pdev = 2838 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV); 2839 wlan_cfg_ctx->rx_flow_search_table_size = 2840 cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE); 2841 wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled = 2842 cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE); 2843 wlan_cfg_ctx->mon_drop_thresh = 2844 cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD); 2845 wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE); 2846 wlan_cfg_ctx->is_rx_fisa_lru_del_enabled = 2847 cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE); 2848 wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP); 2849 wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS); 2850 wlan_cfg_ctx->jitter_stats_enabled = 2851 cfg_get(psoc, CFG_DP_PEER_JITTER_STATS); 2852 wlan_cfg_ctx->is_rx_buff_pool_enabled = 2853 cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE); 2854 wlan_cfg_ctx->is_rx_refill_buff_pool_enabled = 2855 cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE); 2856 wlan_cfg_ctx->rx_pending_high_threshold = 2857 cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD); 2858 wlan_cfg_ctx->rx_pending_low_threshold = 2859 cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD); 2860 wlan_cfg_ctx->is_poll_mode_enabled = 2861 cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE); 2862 wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE); 2863 wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM); 2864 wlan_cfg_ctx->tx_per_pkt_vdev_id_check = 2865 cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK); 2866 wlan_cfg_ctx->radio0_rx_default_reo = 2867 cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO); 2868 wlan_cfg_ctx->radio1_rx_default_reo = 2869 cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO); 2870 wlan_cfg_ctx->radio2_rx_default_reo = 2871 cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO); 2872 wlan_cfg_ctx->wow_check_rx_pending_enable = 2873 cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING); 2874 wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc, 2875 CFG_DP_DELAY_MON_REPLENISH); 2876 wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc, 2877 CFG_DP_RXDMA_MONITOR_BUF_RING); 2878 wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc, 2879 CFG_DP_TX_MONITOR_BUF_RING); 2880 wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx); 2881 wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx); 2882 wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx); 2883 wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx); 2884 wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx); 2885 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 2886 wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) & 2887 PKT_CAPTURE_MODE_DATA_ONLY; 2888 #endif 2889 wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV; 2890 wlan_cfg_ctx->num_rxdma_status_rings_per_pdev = 2891 NUM_RXDMA_RINGS_PER_PDEV; 2892 wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx); 2893 wlan_cfg_ctx->mpdu_retry_threshold_1 = 2894 cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1); 2895 wlan_cfg_ctx->mpdu_retry_threshold_2 = 2896 cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2); 2897 2898 wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc, 2899 CFG_DP_NAPI_SCALE_FACTOR); 2900 wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx); 2901 wlan_cfg_ctx->is_handle_invalid_decap_type_disabled = 2902 cfg_get(psoc, CFG_DP_HANDLE_INVALID_DECAP_TYPE_DISABLE); 2903 return wlan_cfg_ctx; 2904 } 2905 2906 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx) 2907 { 2908 qdf_mem_free(wlan_cfg_ctx); 2909 } 2910 2911 struct wlan_cfg_dp_pdev_ctxt * 2912 wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc) 2913 { 2914 struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx = 2915 qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt)); 2916 2917 if (!wlan_cfg_ctx) 2918 return NULL; 2919 2920 wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc, 2921 CFG_DP_RXDMA_BUF_RING); 2922 wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc, 2923 CFG_DP_RXDMA_MONITOR_BUF_RING); 2924 wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc, 2925 CFG_DP_RXDMA_MONITOR_DST_RING); 2926 wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc, 2927 CFG_DP_TX_MONITOR_DST_RING); 2928 wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc, 2929 CFG_DP_RXDMA_MONITOR_STATUS_RING); 2930 wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc, 2931 CFG_DP_RXDMA_MONITOR_DESC_RING); 2932 wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV; 2933 2934 return wlan_cfg_ctx; 2935 } 2936 2937 void wlan_cfg_set_mon_delayed_replenish_entries( 2938 struct wlan_cfg_dp_soc_ctxt *cfg, 2939 uint32_t val) 2940 { 2941 cfg->delayed_replenish_entries = val; 2942 } 2943 2944 qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries); 2945 2946 int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg) 2947 { 2948 return cfg->delayed_replenish_entries; 2949 } 2950 2951 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx) 2952 { 2953 if (wlan_cfg_ctx) 2954 qdf_mem_free(wlan_cfg_ctx); 2955 } 2956 2957 int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg) 2958 { 2959 return cfg->mon_drop_thresh; 2960 } 2961 2962 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num) 2963 { 2964 cfg->num_int_ctxts = num; 2965 } 2966 2967 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2968 { 2969 cfg->max_peer_id = val; 2970 } 2971 2972 void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val) 2973 { 2974 cfg->max_ast_idx = val; 2975 } 2976 2977 int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg) 2978 { 2979 return cfg->max_ast_idx; 2980 } 2981 2982 qdf_export_symbol(wlan_cfg_get_max_ast_idx); 2983 2984 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2985 int context, int mask) 2986 { 2987 cfg->int_tx_ring_mask[context] = mask; 2988 } 2989 2990 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2991 int context, int mask) 2992 { 2993 cfg->int_rx_ring_mask[context] = mask; 2994 } 2995 2996 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 2997 int context, int mask) 2998 { 2999 cfg->int_rx_mon_ring_mask[context] = mask; 3000 } 3001 3002 void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3003 int context, int mask) 3004 { 3005 cfg->int_tx_mon_ring_mask[context] = mask; 3006 } 3007 3008 int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3009 int context) 3010 { 3011 return cfg->int_host2rxdma_mon_ring_mask[context]; 3012 } 3013 3014 void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3015 int context, int mask) 3016 { 3017 cfg->int_host2rxdma_mon_ring_mask[context] = mask; 3018 } 3019 3020 int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3021 int context) 3022 { 3023 return cfg->int_rxdma2host_mon_ring_mask[context]; 3024 } 3025 3026 void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3027 int context, int mask) 3028 { 3029 cfg->int_rxdma2host_mon_ring_mask[context] = mask; 3030 } 3031 3032 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3033 int context, int mask) 3034 { 3035 cfg->int_rxdma2host_ring_mask[context] = mask; 3036 } 3037 3038 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3039 int context) 3040 { 3041 return cfg->int_rxdma2host_ring_mask[context]; 3042 } 3043 3044 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3045 int context, int mask) 3046 { 3047 cfg->int_host2rxdma_ring_mask[context] = mask; 3048 } 3049 3050 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3051 int context) 3052 { 3053 return cfg->int_host2rxdma_ring_mask[context]; 3054 } 3055 3056 int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3057 int context) 3058 { 3059 return cfg->int_rx_ring_near_full_irq_1_mask[context]; 3060 } 3061 3062 int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3063 int context) 3064 { 3065 return cfg->int_rx_ring_near_full_irq_2_mask[context]; 3066 } 3067 3068 int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3069 int context) 3070 { 3071 return cfg->int_tx_ring_near_full_irq_mask[context]; 3072 } 3073 3074 void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 3075 int hw_macid) 3076 { 3077 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 3078 cfg->hw_macid[pdev_idx] = hw_macid; 3079 } 3080 3081 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx) 3082 { 3083 qdf_assert_always(pdev_idx < MAX_PDEV_CNT); 3084 return cfg->hw_macid[pdev_idx]; 3085 } 3086 3087 qdf_export_symbol(wlan_cfg_get_hw_mac_idx); 3088 3089 int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, 3090 int hw_macid) 3091 { 3092 int idx; 3093 3094 for (idx = 0; idx < MAX_PDEV_CNT; idx++) { 3095 if (cfg->hw_macid[idx] == hw_macid) 3096 return (idx + 1); 3097 } 3098 qdf_assert_always(idx < MAX_PDEV_CNT); 3099 return WLAN_INVALID_PDEV_ID; 3100 } 3101 3102 void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, 3103 int hw_macid) 3104 { 3105 qdf_assert_always((pdev_idx < MAX_PDEV_CNT) || 3106 (pdev_idx == INVALID_PDEV_ID)); 3107 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 3108 cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx; 3109 } 3110 3111 int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid) 3112 { 3113 qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW); 3114 return cfg->hw_macid_pdev_id_map[hw_macid]; 3115 } 3116 3117 qdf_export_symbol(wlan_cfg_get_pdev_idx); 3118 3119 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3120 int context, int mask) 3121 { 3122 cfg->int_ce_ring_mask[context] = mask; 3123 } 3124 3125 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context, 3126 int mask) 3127 { 3128 cfg->int_rx_ring_mask[context] = mask; 3129 } 3130 3131 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3132 int context, int mask) 3133 { 3134 return cfg->int_rx_err_ring_mask[context] = mask; 3135 } 3136 3137 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3138 int context, int mask) 3139 { 3140 return cfg->int_rx_wbm_rel_ring_mask[context] = mask; 3141 } 3142 3143 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3144 int context, int mask) 3145 { 3146 return cfg->int_reo_status_ring_mask[context] = mask; 3147 } 3148 3149 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg) 3150 { 3151 return cfg->num_int_ctxts; 3152 } 3153 3154 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3155 { 3156 return cfg->int_tx_ring_mask[context]; 3157 } 3158 3159 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3160 { 3161 return cfg->int_rx_ring_mask[context]; 3162 } 3163 3164 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3165 int context) 3166 { 3167 return cfg->int_rx_err_ring_mask[context]; 3168 } 3169 3170 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3171 int context) 3172 { 3173 return cfg->int_rx_wbm_rel_ring_mask[context]; 3174 } 3175 3176 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3177 int context) 3178 { 3179 return cfg->int_reo_status_ring_mask[context]; 3180 } 3181 3182 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3183 { 3184 return cfg->int_rx_mon_ring_mask[context]; 3185 } 3186 3187 #ifdef CONFIG_BERYLLIUM 3188 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3189 { 3190 return cfg->int_tx_mon_ring_mask[context]; 3191 } 3192 #else 3193 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3194 { 3195 return 0; 3196 } 3197 #endif 3198 3199 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) 3200 { 3201 return cfg->int_ce_ring_mask[context]; 3202 } 3203 3204 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg) 3205 { 3206 return cfg->max_clients; 3207 } 3208 3209 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3210 { 3211 return cfg->max_alloc_size; 3212 } 3213 3214 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3215 { 3216 return cfg->per_pdev_tx_ring; 3217 } 3218 3219 int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 3220 int context) 3221 { 3222 return cfg->int_umac_reset_intr_mask[context]; 3223 } 3224 3225 uint32_t 3226 wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 3227 { 3228 return cfg->rx_pending_high_threshold; 3229 } 3230 3231 uint32_t 3232 wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg) 3233 { 3234 return cfg->rx_pending_low_threshold; 3235 } 3236 3237 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3238 { 3239 return cfg->per_pdev_lmac_ring; 3240 } 3241 3242 qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring); 3243 3244 #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL) 3245 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3246 { 3247 return 1; 3248 } 3249 3250 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3251 { 3252 return 1; 3253 } 3254 3255 #else 3256 3257 #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL) 3258 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3259 { 3260 if (!cfg->ipa_enabled) 3261 return cfg->num_tcl_data_rings; 3262 3263 return 1; 3264 } 3265 3266 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3267 { 3268 if (!cfg->ipa_enabled) 3269 return cfg->num_nss_tcl_data_rings; 3270 3271 return 1; 3272 } 3273 #else 3274 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3275 { 3276 return cfg->num_tcl_data_rings; 3277 } 3278 3279 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3280 { 3281 return cfg->num_nss_tcl_data_rings; 3282 } 3283 #endif 3284 #endif 3285 3286 int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3287 { 3288 return cfg->num_tx_comp_rings; 3289 } 3290 3291 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3292 { 3293 return cfg->tx_ring_size; 3294 } 3295 3296 int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg) 3297 { 3298 return cfg->time_control_bp; 3299 } 3300 3301 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3302 { 3303 return cfg->tx_comp_ring_size; 3304 } 3305 3306 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg) 3307 { 3308 return cfg->per_pdev_rx_ring; 3309 } 3310 3311 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3312 { 3313 return cfg->num_reo_dest_rings; 3314 } 3315 3316 int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg) 3317 { 3318 return cfg->num_nss_reo_dest_rings; 3319 } 3320 3321 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg) 3322 { 3323 return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/ 3324 } 3325 3326 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 3327 { 3328 return cfg->num_tx_desc_pool; 3329 } 3330 3331 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 3332 { 3333 cfg->num_tx_desc_pool = num_pool; 3334 } 3335 3336 int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg) 3337 { 3338 return cfg->num_tx_ext_desc_pool; 3339 } 3340 3341 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool) 3342 { 3343 cfg->num_tx_ext_desc_pool = num_pool; 3344 } 3345 3346 int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3347 { 3348 return cfg->reo_dst_ring_size; 3349 } 3350 3351 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg, 3352 int reo_dst_ring_size) 3353 { 3354 cfg->reo_dst_ring_size = reo_dst_ring_size; 3355 } 3356 3357 void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg, 3358 bool raw_mode_war) 3359 { 3360 cfg->raw_mode_war = raw_mode_war; 3361 } 3362 3363 bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg) 3364 { 3365 return cfg->raw_mode_war; 3366 } 3367 3368 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3369 { 3370 return cfg->num_tx_desc; 3371 } 3372 3373 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc) 3374 { 3375 cfg->num_tx_desc = num_desc; 3376 } 3377 3378 int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3379 { 3380 return cfg->min_tx_desc; 3381 } 3382 3383 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 3384 { 3385 return cfg->num_tx_ext_desc; 3386 } 3387 3388 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc) 3389 { 3390 cfg->num_tx_ext_desc = num_ext_desc; 3391 } 3392 3393 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg) 3394 { 3395 /* TODO: This should be calculated based on target capabilities */ 3396 return cfg->max_peer_id; 3397 } 3398 3399 int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3400 { 3401 return cfg->dma_mon_buf_ring_size; 3402 } 3403 3404 qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size); 3405 3406 int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3407 { 3408 return cfg->dma_rx_mon_dest_ring_size; 3409 } 3410 3411 qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size); 3412 3413 int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3414 { 3415 return cfg->dma_tx_mon_dest_ring_size; 3416 } 3417 3418 qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size); 3419 3420 int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3421 { 3422 return cfg->dma_mon_status_ring_size; 3423 } 3424 3425 qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size); 3426 3427 int 3428 wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3429 { 3430 return cfg->rxdma_monitor_desc_ring; 3431 } 3432 3433 qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size); 3434 3435 int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) 3436 { 3437 return cfg->rx_dma_buf_ring_size; 3438 } 3439 3440 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg) 3441 { 3442 return cfg->num_mac_rings; 3443 } 3444 3445 qdf_export_symbol(wlan_cfg_get_num_mac_rings); 3446 3447 bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3448 { 3449 return cfg->gro_enabled; 3450 } 3451 3452 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3453 { 3454 return cfg->lro_enabled; 3455 } 3456 3457 bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3458 { 3459 return cfg->ipa_enabled; 3460 } 3461 3462 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 3463 { 3464 cfg->rx_hash = val; 3465 } 3466 3467 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3468 { 3469 return cfg->rx_hash; 3470 } 3471 3472 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg) 3473 { 3474 return cfg->nss_enabled; 3475 } 3476 3477 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled) 3478 { 3479 cfg->nss_enabled = nss_enabled; 3480 } 3481 3482 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg) 3483 { 3484 return cfg->nss_cfg; 3485 } 3486 3487 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg) 3488 { 3489 cfg->nss_cfg = nss_cfg; 3490 if (cfg->nss_cfg) 3491 cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss; 3492 } 3493 3494 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 3495 { 3496 return cfg->int_batch_threshold_tx; 3497 } 3498 3499 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg) 3500 { 3501 return cfg->int_timer_threshold_tx; 3502 } 3503 3504 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 3505 { 3506 return cfg->int_batch_threshold_rx; 3507 } 3508 3509 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg) 3510 { 3511 return cfg->int_timer_threshold_rx; 3512 } 3513 3514 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 3515 { 3516 return cfg->int_batch_threshold_other; 3517 } 3518 3519 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg) 3520 { 3521 return cfg->int_timer_threshold_other; 3522 } 3523 3524 int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg) 3525 { 3526 return cfg->int_timer_threshold_mon; 3527 } 3528 3529 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3530 { 3531 return cfg->p2p_tcp_udp_checksumoffload; 3532 } 3533 3534 int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3535 { 3536 return cfg->nan_tcp_udp_checksumoffload; 3537 } 3538 3539 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg) 3540 { 3541 return cfg->tcp_udp_checksumoffload; 3542 } 3543 3544 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg) 3545 { 3546 return cfg->rx_defrag_min_timeout; 3547 } 3548 3549 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg) 3550 { 3551 return cfg->defrag_timeout_check; 3552 } 3553 3554 int 3555 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3556 { 3557 return cfg->wbm_release_ring; 3558 } 3559 3560 int 3561 wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3562 { 3563 return cfg->tcl_cmd_credit_ring; 3564 } 3565 3566 int 3567 wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3568 { 3569 return cfg->tcl_status_ring; 3570 } 3571 3572 int 3573 wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3574 { 3575 return cfg->reo_reinject_ring; 3576 } 3577 3578 int 3579 wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3580 { 3581 return cfg->rx_release_ring; 3582 } 3583 3584 int 3585 wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3586 { 3587 return cfg->reo_exception_ring; 3588 } 3589 3590 int 3591 wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3592 { 3593 return cfg->reo_cmd_ring; 3594 } 3595 3596 int 3597 wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3598 { 3599 return cfg->reo_status_ring; 3600 } 3601 3602 int 3603 wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3604 { 3605 return cfg->rxdma_refill_ring; 3606 } 3607 3608 bool 3609 wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg) 3610 { 3611 return cfg->rxdma_refill_lt_disable; 3612 } 3613 3614 int 3615 wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg) 3616 { 3617 return cfg->tx_desc_limit_0; 3618 } 3619 3620 int 3621 wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg) 3622 { 3623 return cfg->tx_desc_limit_1; 3624 } 3625 3626 int 3627 wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg) 3628 { 3629 return cfg->tx_desc_limit_2; 3630 } 3631 3632 int 3633 wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg) 3634 { 3635 return cfg->tx_device_limit; 3636 } 3637 3638 int 3639 wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg) 3640 { 3641 return cfg->tx_sw_internode_queue; 3642 } 3643 3644 int 3645 wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3646 { 3647 return cfg->rxdma_err_dst_ring; 3648 } 3649 3650 int 3651 wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg) 3652 { 3653 return cfg->rx_sw_desc_weight; 3654 } 3655 3656 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight); 3657 3658 int 3659 wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg) 3660 { 3661 return cfg->rx_sw_desc_num; 3662 } 3663 3664 uint32_t 3665 wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg) 3666 { 3667 return cfg->reo_rings_mapping; 3668 } 3669 3670 bool 3671 wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg, 3672 enum cdp_capabilities dp_caps) 3673 { 3674 switch (dp_caps) { 3675 case CDP_CFG_DP_TSO: 3676 return cfg->tso_enabled; 3677 case CDP_CFG_DP_LRO: 3678 return cfg->lro_enabled; 3679 case CDP_CFG_DP_SG: 3680 return cfg->sg_enabled; 3681 case CDP_CFG_DP_GRO: 3682 return cfg->gro_enabled; 3683 case CDP_CFG_DP_OL_TX_CSUM: 3684 return cfg->ol_tx_csum_enabled; 3685 case CDP_CFG_DP_OL_RX_CSUM: 3686 return cfg->ol_rx_csum_enabled; 3687 case CDP_CFG_DP_RAWMODE: 3688 return cfg->rawmode_enabled; 3689 case CDP_CFG_DP_PEER_FLOW_CTRL: 3690 return cfg->peer_flow_ctrl_enabled; 3691 case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT: 3692 return cfg->notify_frame_support; 3693 default: 3694 return false; 3695 } 3696 } 3697 3698 void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg, 3699 bool val) 3700 { 3701 cfg->is_tso_desc_attach_defer = val; 3702 } 3703 3704 bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg) 3705 { 3706 return cfg->is_tso_desc_attach_defer; 3707 } 3708 3709 #ifdef QCA_LL_TX_FLOW_CONTROL_V2 3710 /** 3711 * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold 3712 * @cfg: config context 3713 * 3714 * Return: stop threshold 3715 */ 3716 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg) 3717 { 3718 return cfg->tx_flow_stop_queue_threshold; 3719 } 3720 3721 /** 3722 * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset 3723 * for TX to resume 3724 * @cfg: config context 3725 * 3726 * Return: stop threshold 3727 */ 3728 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg) 3729 { 3730 return cfg->tx_flow_start_queue_offset; 3731 } 3732 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ 3733 3734 void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 3735 bool val) 3736 { 3737 cfg->is_rx_flow_tag_enabled = val; 3738 } 3739 3740 uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg) 3741 { 3742 return cfg->rx_toeplitz_hash_key; 3743 } 3744 3745 uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg) 3746 { 3747 return cfg->rx_flow_max_search; 3748 } 3749 3750 bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3751 { 3752 return cfg->is_rx_flow_tag_enabled; 3753 } 3754 3755 qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled); 3756 3757 #ifdef WLAN_SUPPORT_RX_FISA 3758 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3759 { 3760 return (bool)(cfg->is_rx_fisa_enabled); 3761 } 3762 3763 bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3764 { 3765 return cfg->is_rx_fisa_lru_del_enabled; 3766 } 3767 #else 3768 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3769 { 3770 return false; 3771 } 3772 3773 bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3774 { 3775 return false; 3776 } 3777 #endif 3778 3779 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3780 { 3781 return (bool)(cfg->is_poll_mode_enabled); 3782 } 3783 3784 void 3785 wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg, 3786 bool val) 3787 { 3788 cfg->is_rx_flow_search_table_per_pdev = val; 3789 } 3790 3791 bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg) 3792 { 3793 return cfg->is_rx_flow_search_table_per_pdev; 3794 } 3795 3796 void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg, 3797 uint16_t val) 3798 { 3799 cfg->rx_flow_search_table_size = val; 3800 } 3801 3802 uint16_t 3803 wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3804 { 3805 return cfg->rx_flow_search_table_size; 3806 } 3807 3808 void 3809 wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, 3810 bool val) 3811 { 3812 cfg->is_rx_mon_protocol_flow_tag_enabled = val; 3813 } 3814 3815 bool 3816 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3817 { 3818 return cfg->is_rx_mon_protocol_flow_tag_enabled; 3819 } 3820 3821 qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled); 3822 3823 void 3824 wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg, 3825 bool val) 3826 { 3827 cfg->tx_per_pkt_vdev_id_check = val; 3828 } 3829 3830 bool 3831 wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3832 { 3833 return cfg->tx_per_pkt_vdev_id_check; 3834 } 3835 3836 void 3837 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg, 3838 bool val) 3839 { 3840 cfg->pext_stats_enabled = val; 3841 } 3842 3843 void 3844 wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg, 3845 bool val) 3846 { 3847 cfg->jitter_stats_enabled = val; 3848 } 3849 3850 bool 3851 wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3852 { 3853 return cfg->pext_stats_enabled; 3854 } 3855 3856 bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3857 { 3858 return cfg->fst_in_cmem; 3859 } 3860 3861 bool wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3862 { 3863 return cfg->jitter_stats_enabled; 3864 } 3865 3866 #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL 3867 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3868 { 3869 return cfg->is_rx_buff_pool_enabled; 3870 } 3871 3872 bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3873 { 3874 return cfg->is_rx_refill_buff_pool_enabled; 3875 } 3876 #else 3877 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3878 { 3879 return false; 3880 } 3881 3882 bool wlan_cfg_is_rx_refill_buffer_pool_enabled( 3883 struct wlan_cfg_dp_soc_ctxt *cfg) 3884 { 3885 return false; 3886 } 3887 #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */ 3888 3889 #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR 3890 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3891 { 3892 return (bool)(cfg->is_swlm_enabled); 3893 } 3894 #else 3895 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3896 { 3897 return false; 3898 } 3899 #endif 3900 uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3901 { 3902 return cfg->radio0_rx_default_reo; 3903 } 3904 3905 uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3906 { 3907 return cfg->radio1_rx_default_reo; 3908 } 3909 3910 uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg) 3911 { 3912 return cfg->radio2_rx_default_reo; 3913 } 3914 3915 void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg) 3916 { 3917 cfg->rxdma1_enable = true; 3918 } 3919 3920 void 3921 wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, 3922 bool val) 3923 { 3924 cfg->delay_mon_replenish = val; 3925 } 3926 3927 bool 3928 wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg) 3929 { 3930 return cfg->delay_mon_replenish; 3931 } 3932 3933 qdf_export_symbol(wlan_cfg_is_delay_mon_replenish); 3934 3935 void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg) 3936 { 3937 dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,", 3938 cfg->delay_mon_replenish); 3939 dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d", 3940 cfg->reo_dst_ring_size, cfg->delayed_replenish_entries); 3941 } 3942 3943 #ifdef IPA_OFFLOAD 3944 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3945 { 3946 return cfg->ipa_tx_ring_size; 3947 } 3948 3949 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3950 { 3951 return cfg->ipa_tx_comp_ring_size; 3952 } 3953 3954 #ifdef IPA_WDI3_TX_TWO_PIPES 3955 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3956 { 3957 return cfg->ipa_tx_alt_ring_size; 3958 } 3959 3960 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3961 { 3962 return cfg->ipa_tx_alt_comp_ring_size; 3963 } 3964 3965 #else 3966 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3967 { 3968 return cfg->ipa_tx_ring_size; 3969 } 3970 3971 int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3972 { 3973 return cfg->ipa_tx_comp_ring_size; 3974 } 3975 #endif 3976 #endif 3977 3978 #ifdef WLAN_SUPPORT_PPEDS 3979 bool 3980 wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg) 3981 { 3982 return cfg->ppe_enable; 3983 } 3984 3985 int 3986 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3987 { 3988 return cfg->reo2ppe_ring; 3989 } 3990 3991 int 3992 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3993 { 3994 return cfg->ppe2tcl_ring; 3995 } 3996 3997 int 3998 wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 3999 { 4000 return cfg->ppe_release_ring; 4001 } 4002 4003 int 4004 wlan_cfg_get_dp_soc_ppe_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg) 4005 { 4006 return cfg->ppe_num_tx_desc; 4007 } 4008 #endif 4009 4010 void 4011 wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 4012 struct wlan_dp_prealloc_cfg *cfg) 4013 { 4014 if (!ctrl_psoc || !cfg) 4015 return; 4016 4017 cfg->num_reo_dst_ring_entries = cfg_get(ctrl_psoc, 4018 CFG_DP_RX_DESTINATION_RING); 4019 cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE); 4020 cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc, 4021 CFG_DP_TX_COMPL_RING_SIZE); 4022 cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc, 4023 CFG_DP_WBM_RELEASE_RING); 4024 cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc, 4025 CFG_DP_RXDMA_ERR_DST_RING); 4026 cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc, 4027 CFG_DP_REO_EXCEPTION_RING); 4028 cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC); 4029 cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC); 4030 cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc, 4031 CFG_DP_RXDMA_BUF_RING); 4032 cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc, 4033 CFG_DP_RXDMA_REFILL_RING); 4034 cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc, 4035 CFG_DP_REO_STATUS_RING); 4036 cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc, 4037 CFG_DP_RXDMA_MONITOR_STATUS_RING); 4038 } 4039 4040 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 4041 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg) 4042 { 4043 return cfg->pkt_capture_mode; 4044 } 4045 #endif 4046 4047 uint32_t 4048 wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 4049 { 4050 return cfg->rx_mon_buf_ring_size; 4051 } 4052 4053 qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size); 4054 4055 uint32_t 4056 wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg) 4057 { 4058 return cfg->tx_mon_buf_ring_size; 4059 } 4060 4061 qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size); 4062 4063 uint8_t 4064 wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg) 4065 { 4066 return cfg->rx_rel_wbm2sw_ring_id; 4067 } 4068 4069 void 4070 wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg, 4071 uint8_t wbm2sw_ring_id) 4072 { 4073 cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id; 4074 } 4075 4076 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 4077 uint8_t 4078 wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg) 4079 { 4080 return cfg->mlo_chip_rx_ring_map; 4081 } 4082 #endif 4083 4084 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT 4085 bool 4086 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4087 { 4088 return cfg->vdev_stats_hw_offload_config; 4089 } 4090 4091 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 4092 { 4093 return cfg->vdev_stats_hw_offload_timer; 4094 } 4095 4096 void 4097 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 4098 bool val) 4099 { 4100 cfg->vdev_stats_hw_offload_config = val; 4101 } 4102 #else 4103 bool 4104 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4105 { 4106 return false; 4107 } 4108 4109 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg) 4110 { 4111 return 0; 4112 } 4113 4114 void 4115 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, 4116 bool val) 4117 {} 4118 #endif 4119 4120 #ifdef CONFIG_SAWF 4121 bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4122 { 4123 return cfg->sawf_enabled; 4124 } 4125 4126 void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 4127 { 4128 cfg->sawf_enabled = val; 4129 } 4130 #else 4131 bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) 4132 { 4133 return false; 4134 } 4135 4136 void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) 4137 { 4138 } 4139 #endif 4140 4141 #ifdef CONFIG_BERYLLIUM 4142 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4143 int context) 4144 { 4145 return cfg->int_host2txmon_ring_mask[context]; 4146 } 4147 4148 qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask); 4149 4150 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4151 int context, int mask) 4152 { 4153 cfg->int_host2txmon_ring_mask[context] = mask; 4154 } 4155 #else 4156 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4157 int context) 4158 { 4159 return 0; 4160 } 4161 4162 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, 4163 int context, int mask) 4164 { 4165 } 4166 #endif 4167 4168 qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask); 4169 4170 void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg, 4171 bool txmon_hw_support) 4172 { 4173 cfg->txmon_hw_support = txmon_hw_support; 4174 } 4175 4176 bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg) 4177 { 4178 return cfg->txmon_hw_support; 4179 } 4180 4181 qdf_export_symbol(wlan_cfg_get_txmon_hw_support); 4182 4183 uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg) 4184 { 4185 return cfg->napi_scale_factor; 4186 } 4187