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