xref: /wlan-dirver/qca-wifi-host-cmn/wlan_cfg/wlan_cfg.h (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2013-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 #ifndef __WLAN_CFG_H
21 #define __WLAN_CFG_H
22 
23 #include <wlan_init_cfg.h>
24 
25 /* DP process status */
26 #if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1)
27 #define CONFIG_PROCESS_RX_STATUS 1
28 #define CONFIG_PROCESS_TX_STATUS 1
29 #else
30 #define CONFIG_PROCESS_RX_STATUS 0
31 #define CONFIG_PROCESS_TX_STATUS 0
32 #endif
33 
34 /* Miscellaneous configuration */
35 #define MAX_IDLE_SCATTER_BUFS 16
36 #define DP_MAX_IRQ_PER_CONTEXT 12
37 #define MAX_HTT_METADATA_LEN 32
38 #define DP_MAX_TIDS 17
39 #define DP_NON_QOS_TID 16
40 #define DP_NULL_DATA_TID 17
41 
42 #ifdef CONFIG_BERYLLIUM
43 #define WLAN_CFG_RX_FST_MAX_SEARCH 16
44 #else
45 #define WLAN_CFG_RX_FST_MAX_SEARCH 2
46 #endif
47 #define WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN 40
48 
49 #define INVALID_PDEV_ID 0xFF
50 
51 #define WLAN_CFG_RX_RING_MASK_0 0x1
52 #define WLAN_CFG_RX_RING_MASK_1 0x2
53 #define WLAN_CFG_RX_RING_MASK_2 0x4
54 #define WLAN_CFG_RX_RING_MASK_3 0x8
55 #define WLAN_CFG_RX_RING_MASK_4 0x10
56 #define WLAN_CFG_RX_RING_MASK_5 0x20
57 #define WLAN_CFG_RX_RING_MASK_6 0x40
58 #define WLAN_CFG_RX_RING_MASK_7 0x80
59 
60 #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
61 #ifdef IPA_OFFLOAD
62 #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 |	\
63 					  WLAN_CFG_RX_RING_MASK_1 |	\
64 					  WLAN_CFG_RX_RING_MASK_2)
65 
66 #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 |	\
67 					  WLAN_CFG_RX_RING_MASK_5 |	\
68 					  WLAN_CFG_RX_RING_MASK_6)
69 
70 #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
71 					     WLAN_CFG_TX_RING_MASK_4 | \
72 					     WLAN_CFG_TX_RING_MASK_2)
73 
74 #else
75 #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 |	\
76 					  WLAN_CFG_RX_RING_MASK_1 |	\
77 					  WLAN_CFG_RX_RING_MASK_2 |	\
78 					  WLAN_CFG_RX_RING_MASK_3)
79 
80 #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 |	\
81 					  WLAN_CFG_RX_RING_MASK_5 |	\
82 					  WLAN_CFG_RX_RING_MASK_6 |	\
83 					  WLAN_CFG_RX_RING_MASK_7)
84 
85 #ifdef QCA_WIFI_KIWI_V2
86 #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
87 					     WLAN_CFG_TX_RING_MASK_4 | \
88 					     WLAN_CFG_TX_RING_MASK_2 | \
89 					     WLAN_CFG_TX_RING_MASK_5 | \
90 					     WLAN_CFG_TX_RING_MASK_6)
91 #else /* !QCA_WIFI_KIWI_V2 */
92 #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
93 					     WLAN_CFG_TX_RING_MASK_4 | \
94 					     WLAN_CFG_TX_RING_MASK_2 | \
95 					     WLAN_CFG_TX_RING_MASK_6 | \
96 					     WLAN_CFG_TX_RING_MASK_7)
97 #endif /* QCA_WIFI_KIWI_V2 */
98 #endif
99 #endif
100 
101 /* Max number of chips that can participate in MLO */
102 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
103 #define WLAN_MAX_MLO_CHIPS 3
104 #define WLAN_MAX_MLO_LINKS_PER_SOC 2
105 #else
106 #define WLAN_MAX_MLO_CHIPS 1
107 #endif
108 
109 struct wlan_cfg_dp_pdev_ctxt;
110 
111 /**
112  * struct wlan_cfg_tcl_wbm_ring_num_map - TCL WBM Ring number mapping
113  * @tcl_ring_num - TCL Ring number
114  * @wbm_ring_num - WBM Ring number
115  * @wbm_ring_num - WBM RBM ID to be used when enqueuing to TCL
116  * @for_ipa - whether this TCL/WBM for IPA use or not
117  */
118 struct wlan_cfg_tcl_wbm_ring_num_map {
119 	uint8_t tcl_ring_num;
120 	uint8_t wbm_ring_num;
121 	uint8_t wbm_rbm_id;
122 	uint8_t for_ipa;
123 };
124 
125 /**
126  * struct wlan_srng_cfg - Per ring configuration parameters
127  * @timer_threshold: Config to control interrupts based on timer duration
128  * @batch_count_threshold: Config to control interrupts based on
129  * number of packets in the ring
130  * @low_threshold: Config to control low threshold interrupts for SRC rings
131  */
132 struct wlan_srng_cfg {
133 	uint32_t timer_threshold;
134 	uint32_t batch_count_threshold;
135 	uint32_t low_threshold;
136 };
137 
138 /**
139  * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
140  * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
141  * @max_clients: Maximum number of peers/stations supported by device
142  * @max_alloc_size: Maximum allocation size for any dynamic memory
143  *			allocation request for this device
144  * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
145  *		       1: Each TCL ring is mapped to one radio/pdev
146  * @num_tx_comp_rings: Number of Tx comp rings supported by device
147  * @num_tcl_data_rings: Number of TCL Data rings supported by device
148  * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
149  *		       1: Each REO ring is mapped to one radio/pdev
150  * @num_tx_desc_pool: Number of Tx Descriptor pools
151  * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
152  * @num_tx_desc: Number of Tx Descriptors per pool
153  * @min_tx_desc: Minimum number of Tx Descriptors per pool
154  * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
155  * @max_peer_id: Maximum value of peer id that FW can assign for a client
156  * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
157  * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
158  * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
159  * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
160  *			  NAPI/Intr context
161  * @int_tx_mon_ring_mask: Bitmap of Tx monitor ring interrupts mapped to each
162  *			  NAPI/Intr context
163  * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
164  *			  NAPI/Intr context
165  * @int_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
166  *			  NAPI/Intr context
167  * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
168  *                            each NAPI/Intr context
169  * @int_rxdma2host_ring_mask:
170  * @int_host2rxdma_ring_mask:
171  * @int_rx_ring_near_full_irq_1_mask: Bitmap of REO DST ring near full interrupt
172  *				mapped to each NAPI/INTR context
173  * @int_rx_ring_near_full_irq_2_mask: Bitmap of REO DST ring near full interrupt
174  *				mapped to each NAPI/INTR context
175  * @int_tx_ring_near_full_irq_mask: Bitmap of Tx completion ring near full
176  *				interrupt mapped to each NAPI/INTR context
177  * @int_host2txmon_ring_mask: Bitmap of Tx monitor source ring interrupt
178  *				mapped to each NAPI/INTR context
179  * @int_umac_reset_intr_mask: Bitmap of UMAC reset interrupt mapped to each
180  * NAPI/INTR context
181  * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
182  * @lro_enabled: enable/disable lro feature
183  * @rx_hash: Enable hash based steering of rx packets
184  * @tso_enabled: enable/disable tso feature
185  * @lro_enabled: enable/disable LRO feature
186  * @sg_enabled: enable disable scatter gather feature
187  * @gro_enabled: enable disable GRO feature
188  * @tc_based_dynamic_gro: enable/disable tc based dynamic gro
189  * @tc_ingress_prio: ingress prio to be checked for dynamic gro
190  * @ipa_enabled: Flag indicating if IPA is enabled
191  * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
192  * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
193  * @rawmode_enabled: Flag indicating if RAW mode is enabled
194  * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
195  * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
196  * @p2p_tcp_udp_checksumoffload: enable/disable checksum offload for P2P mode
197  * @nan_tcp_udp_checksumoffload: enable/disable checksum offload for NAN mode
198  * @tcp_udp_checksumoffload: enable/disable checksum offload
199  * @nss_cfg: nss configuration
200  * @rx_defrag_min_timeout: rx defrag minimum timeout
201  * @wbm_release_ring: wbm release ring size
202  * @tcl_cmd_credit_ring: tcl command/credit ring size
203  * @tcl_status_ring: tcl status ring size
204  * @reo_reinject_ring: reo reinject ring
205  * @rx_release_ring: rx release ring size
206  * @reo_exception_ring: reo exception ring size
207  * @reo_cmd_ring: reo cmd ring size
208  * @reo_status_ring: reo status ting size
209  * @rxdma_refill_ring: rxdma refill ring size
210  * @rxdma_err_dst_ring: rxdma error detination ring size
211  * @raw_mode_war: enable/disable raw mode war
212  * @enable_data_stall_detection: enable/disable specific data stall detection
213  * @disable_intra_bss_fwd: flag to disable intra bss forwarding
214  * @rxdma1_enable: flag to indicate if rxdma1 is enabled
215  * @delay_mon_replenish: delay monitor buffer replenish
216  * @tx_desc_limit_0: tx_desc limit for 5G H
217  * @tx_desc_limit_1: tx_desc limit for 2G
218  * @tx_desc_limit_2: tx_desc limit for 5G L
219  * @tx_device_limit: tx device limit
220  * @tx_sw_internode_queue: tx sw internode queue
221  * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
222  * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
223  * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
224  * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
225  *                            dp_rx_process loop
226  * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
227  *                                at end of tx_comp_handler loop.
228  * @rx_sw_desc_weight: rx sw descriptor weight configuration
229  * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or
230  *                                       flow tagging in monitor/mon-lite mode
231  * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE
232  * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev
233  *                                    table should be used
234  * @rx_flow_search_table_size: indicates the number of flows in the flow search
235  *                             table
236  * @rx_flow_max_search: max skid length for each hash entry
237  * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
238  *                        5 tuple flow entry
239  * @pktlog_buffer_size: packet log buffer size
240  * @is_rx_fisa_enabled: flag to enable/disable FISA Rx
241  * @pext_stats_enabled: Flag to enable and disabled peer extended stats
242  * @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
243  *                           pool support
244  * @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
245  *                           pool support
246  * @rx_pending_high_threshold: threshold of starting pkt drop
247  * @rx_pending_low_threshold: threshold of stopping pkt drop
248  * @is_swlm_enabled: flag to enable/disable SWLM
249  * @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
250  * @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
251  * @ipa_tx_ring_size: IPA tx ring size
252  * @ipa_tx_comp_ring_size: IPA tx completion ring size
253  * @ipa_tx_alt_ring_size: IPA tx alt ring size
254  * @ipa_tx_alt_comp_ring_size: IPA tx alt completion ring size
255  * @hw_cc_conv_enabled: cookie conversion enabled
256  * @tcl_wbm_map_array: TCL-WBM map array
257  * @pkt_capture_mode: Packet capture mode config
258  * @rx_mon_buf_ring_size: Rx monitor buf ring size
259  * @tx_mon_buf_ring_size: Tx monitor buf ring size
260  * @tx_rings_grp_bitmap: bitmap of group intr contexts which have
261  *  non-zero tx ring mask
262  * @mlo_chip_rx_ring_map: map of chip_id to rx ring map
263  * @mlo_chip_default_rx_ring_id: default rx_ring of chip when hash is not found
264  * @lmac_peer_id_msb: value used for hash based routing
265  * @vdev_stats_hw_offload_config: HW vdev stats config
266  * @vdev_stats_hw_offload_timer: HW vdev stats timer duration
267  * @txmon_hw_support: TxMON HW support
268  * @num_rxdma_status_rings_per_pdev: Num RXDMA status rings
269  * @mpdu_retry_threshold_1: MPDU retry threshold 1 to increment tx bad count
270  * @mpdu_retry_threshold_2: MPDU retry threshold 2 to increment tx bad count
271  * napi_scale_factor: scaling factor to be used for napi polls
272  * @notify_frame_support: flag indicating capability to mark notify frames
273  */
274 struct wlan_cfg_dp_soc_ctxt {
275 	int num_int_ctxts;
276 	int max_clients;
277 	int max_alloc_size;
278 	int per_pdev_tx_ring;
279 	int num_tx_comp_rings;
280 	int num_tcl_data_rings;
281 	int num_nss_tcl_data_rings;
282 	int per_pdev_rx_ring;
283 	int per_pdev_lmac_ring;
284 	int num_reo_dest_rings;
285 	int num_nss_reo_dest_rings;
286 	int num_tx_desc_pool;
287 	int num_tx_ext_desc_pool;
288 	int num_tx_desc;
289 	int min_tx_desc;
290 	int num_tx_ext_desc;
291 	int max_peer_id;
292 	int htt_packet_type;
293 	int int_batch_threshold_tx;
294 	int int_timer_threshold_tx;
295 	int int_batch_threshold_rx;
296 	int int_timer_threshold_rx;
297 	int int_batch_threshold_other;
298 	int int_timer_threshold_other;
299 	int int_timer_threshold_mon;
300 	int tx_ring_size;
301 	int tx_comp_ring_size;
302 	int tx_comp_ring_size_nss;
303 	uint8_t int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
304 	uint8_t int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
305 	uint8_t int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
306 	uint8_t int_tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
307 	uint8_t int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
308 	uint8_t int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
309 	uint8_t int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
310 	uint8_t int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
311 	uint8_t int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
312 	uint8_t int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
313 	uint8_t int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
314 	uint8_t int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
315 	uint8_t int_rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
316 	uint8_t int_rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
317 	uint8_t int_tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
318 	uint8_t int_host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
319 	uint8_t int_umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS];
320 	int hw_macid[MAX_PDEV_CNT];
321 	int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
322 	int base_hw_macid;
323 	bool rx_hash;
324 	bool tso_enabled;
325 	bool lro_enabled;
326 	bool sg_enabled;
327 	bool gro_enabled;
328 	bool tc_based_dynamic_gro;
329 	uint32_t tc_ingress_prio;
330 	bool ipa_enabled;
331 	bool ol_tx_csum_enabled;
332 	bool ol_rx_csum_enabled;
333 	bool rawmode_enabled;
334 	bool peer_flow_ctrl_enabled;
335 	bool napi_enabled;
336 	bool p2p_tcp_udp_checksumoffload;
337 	bool nan_tcp_udp_checksumoffload;
338 	bool tcp_udp_checksumoffload;
339 	bool legacy_mode_checksumoffload_disable;
340 	bool defrag_timeout_check;
341 	int nss_cfg;
342 	uint32_t tx_flow_stop_queue_threshold;
343 	uint32_t tx_flow_start_queue_offset;
344 	int rx_defrag_min_timeout;
345 	int reo_dst_ring_size;
346 	int wbm_release_ring;
347 	int tcl_cmd_credit_ring;
348 	int tcl_status_ring;
349 	int reo_reinject_ring;
350 	int rx_release_ring;
351 	int reo_exception_ring;
352 	int reo_cmd_ring;
353 	int reo_status_ring;
354 	int rxdma_refill_ring;
355 	int rxdma_err_dst_ring;
356 	uint32_t per_pkt_trace;
357 	bool raw_mode_war;
358 	uint32_t enable_data_stall_detection;
359 	bool disable_intra_bss_fwd;
360 	bool rxdma1_enable;
361 	bool delay_mon_replenish;
362 	int max_ast_idx;
363 	int tx_desc_limit_0;
364 	int tx_desc_limit_1;
365 	int tx_desc_limit_2;
366 	int tx_device_limit;
367 	int tx_sw_internode_queue;
368 	int mon_drop_thresh;
369 #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
370 	uint32_t tx_comp_loop_pkt_limit;
371 	uint32_t rx_reap_loop_pkt_limit;
372 	uint32_t rx_hp_oos_update_limit;
373 	bool rx_enable_eol_data_check;
374 	bool tx_comp_enable_eol_data_check;
375 #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
376 	int rx_sw_desc_weight;
377 	int rx_sw_desc_num;
378 	bool is_rx_mon_protocol_flow_tag_enabled;
379 	bool is_rx_flow_tag_enabled;
380 	bool is_rx_flow_search_table_per_pdev;
381 	uint16_t rx_flow_search_table_size;
382 	uint16_t rx_flow_max_search;
383 	uint8_t *rx_toeplitz_hash_key;
384 	uint8_t pktlog_buffer_size;
385 	uint8_t is_rx_fisa_enabled;
386 	bool is_rx_fisa_lru_del_enabled;
387 	bool is_tso_desc_attach_defer;
388 	uint32_t delayed_replenish_entries;
389 	uint32_t reo_rings_mapping;
390 	bool pext_stats_enabled;
391 	bool is_rx_buff_pool_enabled;
392 	bool is_rx_refill_buff_pool_enabled;
393 	uint32_t rx_pending_high_threshold;
394 	uint32_t rx_pending_low_threshold;
395 	bool is_poll_mode_enabled;
396 	uint8_t is_swlm_enabled;
397 	bool fst_in_cmem;
398 	bool tx_per_pkt_vdev_id_check;
399 	uint8_t radio0_rx_default_reo;
400 	uint8_t radio1_rx_default_reo;
401 	uint8_t radio2_rx_default_reo;
402 	bool wow_check_rx_pending_enable;
403 #ifdef IPA_OFFLOAD
404 	uint32_t ipa_tx_ring_size;
405 	uint32_t ipa_tx_comp_ring_size;
406 #ifdef IPA_WDI3_TX_TWO_PIPES
407 	int ipa_tx_alt_ring_size;
408 	int ipa_tx_alt_comp_ring_size;
409 #endif /* IPA_WDI3_TX_TWO_PIPES */
410 #endif /* IPA_OFFLOAD */
411 	bool hw_cc_enabled;
412 	struct wlan_cfg_tcl_wbm_ring_num_map *tcl_wbm_map_array;
413 #ifdef WLAN_SUPPORT_PPEDS
414 	bool ppe_enable;
415 	int reo2ppe_ring;
416 	int ppe2tcl_ring;
417 	int ppe_release_ring;
418 #endif
419 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
420 	uint32_t pkt_capture_mode;
421 #endif
422 	uint32_t rx_mon_buf_ring_size;
423 	uint32_t tx_mon_buf_ring_size;
424 	uint8_t rx_rel_wbm2sw_ring_id;
425 	uint32_t tx_rings_grp_bitmap;
426 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
427 	uint8_t mlo_chip_rx_ring_map[WLAN_MAX_MLO_CHIPS];
428 	uint8_t mlo_chip_default_rx_ring_id[WLAN_MAX_MLO_CHIPS];
429 	uint8_t lmac_peer_id_msb[WLAN_MAX_MLO_CHIPS];
430 #endif
431 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
432 	bool vdev_stats_hw_offload_config;
433 	int vdev_stats_hw_offload_timer;
434 #endif
435 	uint8_t num_rxdma_dst_rings_per_pdev;
436 	bool txmon_hw_support;
437 	uint8_t num_rxdma_status_rings_per_pdev;
438 #ifdef WLAN_TX_PKT_CAPTURE_ENH
439 	uint32_t tx_capt_max_mem_allowed;
440 #endif
441 #ifdef CONFIG_SAWF
442 	bool sawf_enabled;
443 #endif
444 	uint8_t mpdu_retry_threshold_1;
445 	uint8_t mpdu_retry_threshold_2;
446 	uint8_t napi_scale_factor;
447 	uint8_t notify_frame_support;
448 };
449 
450 /**
451  * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
452  * @rx_dma_buf_ring_size - Size of RxDMA buffer ring
453  * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring
454  * @dma_rx_mon_dest_ring_size - Size of RxDMA Monitor Destination ring
455  * @dma_tx_mon_dest_ring_size - Size of Tx Monitor Destination ring
456  * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring
457  * @rxdma_monitor_desc_ring - rxdma monitor desc ring size
458  * @dma_tx_mon_buf_ring_size - Tx monitor BUF Ring size
459  */
460 struct wlan_cfg_dp_pdev_ctxt {
461 	int rx_dma_buf_ring_size;
462 	int dma_mon_buf_ring_size;
463 	int dma_rx_mon_dest_ring_size;
464 	int dma_tx_mon_dest_ring_size;
465 	int dma_mon_status_ring_size;
466 	int rxdma_monitor_desc_ring;
467 	int num_mac_rings;
468 	int nss_enabled;
469 	int dma_tx_mon_buf_ring_size;
470 };
471 
472 /**
473  * struct wlan_dp_prealloc_cfg - DP prealloc related config
474  * @num_tx_ring_entries: num of tcl data ring entries
475  * @num_tx_comp_ring_entries: num of tx comp ring entries
476  * @num_wbm_rel_ring_entries: num of wbm err ring entries
477  * @num_rxdma_err_dst_ring_entries: num of rxdma err ring entries
478  * @num_reo_exception_ring_entries: num of rx exception ring entries
479  * @num_tx_desc: num of tx descriptors
480  * @num_tx_ext_desc: num of tx ext descriptors
481  */
482 struct wlan_dp_prealloc_cfg {
483 	int num_tx_ring_entries;
484 	int num_tx_comp_ring_entries;
485 	int num_wbm_rel_ring_entries;
486 	int num_rxdma_err_dst_ring_entries;
487 	int num_reo_exception_ring_entries;
488 	int num_tx_desc;
489 	int num_tx_ext_desc;
490 };
491 
492 /**
493  * wlan_cfg_soc_attach() - Attach configuration interface for SoC
494  * @ctrl_obj - PSOC object
495  *
496  * Allocates context for Soc configuration parameters,
497  * Read configuration information from device tree/ini file and
498  * returns back handle
499  *
500  * Return: Handle to configuration context
501  */
502 struct wlan_cfg_dp_soc_ctxt *
503 wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
504 
505 /**
506  * wlan_cfg_soc_detach() - Detach soc configuration handle
507  * @wlan_cfg_ctx: soc configuration handle
508  *
509  * De-allocates memory allocated for SoC configuration
510  *
511  * Return:none
512  */
513 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
514 
515 /**
516  * wlan_cfg_pdev_attach() Attach configuration interface for pdev
517  * @ctrl_obj - PSOC object
518  *
519  * Allocates context for pdev configuration parameters,
520  * Read configuration information from device tree/ini file and
521  * returns back handle
522  *
523  * Return: Handle to configuration context
524  */
525 struct wlan_cfg_dp_pdev_ctxt *
526 wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
527 
528 /**
529  * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
530  * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
531  *
532  * Return: void
533  */
534 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
535 
536 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
537 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
538 			       int context, int mask);
539 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
540 			       int context, int mask);
541 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
542 				   int context, int mask);
543 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
544 			       int context, int mask);
545 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
546 				  int mask);
547 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
548 void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
549 int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
550 int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg);
551 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
552 				int context, int mask);
553 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
554 					int context, int mask);
555 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
556 					int context, int mask);
557 
558 /**
559  * wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
560  *				for monitor buffer ring at initialization
561  * @wlan_cfg_ctx - Configuration Handle
562  * @replenish_entries - number of entries to replenish at initialization
563  *
564  */
565 void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
566 						*wlan_cfg_ctx,
567 						uint32_t replenish_entries);
568 
569 /**
570  * wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
571  *				for monitor buffer ring at initialization
572  * @wlan_cfg_ctx - Configuration Handle
573  * @replenish_entries - number of entries to replenish at initialization
574  *
575  * Return: delayed_replenish_entries;
576  */
577 int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
578 					       *wlan_cfg_ctx);
579 /**
580  * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
581  * @wlan_cfg_ctx - Configuration Handle
582  *
583  * For WIN,  DP_NUM_INTERRUPT_CONTEXTS will be equal to  number of CPU cores.
584  * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
585  * rx_ring_mask ,and rx_monitor_ring mask  to indicate the rings
586  * that are processed by the handler.
587  *
588  * Return: num_contexts
589  */
590 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
591 
592 /**
593  * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
594  *				 interrupt context
595  * @wlan_cfg_ctx - Configuration Handle
596  * @context - Numerical ID identifying the Interrupt/NAPI context
597  *
598  * Return: int_tx_ring_mask[context]
599  */
600 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
601 		int context);
602 
603 /**
604  * wlan_cfg_get_tcl_wbm_ring_num_for_index() - Get TCL/WBM ring number for index
605  * @wlan_cfg_ctx - Configuration Handle
606  * @index: index for which TCL/WBM ring numbers are needed
607  * @tcl: pointer to TCL ring number, to be filled
608  * @wbm: pointer to WBM ring number to be filled
609  *
610  * The function fills in tcl/wbm input pointers with TCL/WBM ring numbers for a
611  * given index corresponding to soc->tcl_data_ring or soc->tx_comp_ring. This
612  * is needed since WBM/TCL rings may not be sequentially available for HOST
613  * to use. The function returns values as stored in tcl_wbm_map_array global
614  * array.
615  *
616  * Return: None
617  */
618 static inline
619 void wlan_cfg_get_tcl_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
620 					     int index, int *tcl, int *wbm)
621 {
622 	*tcl = wlan_cfg_ctx->tcl_wbm_map_array[index].tcl_ring_num;
623 	*wbm = wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
624 }
625 
626 /**
627  * wlan_cfg_get_wbm_ring_num_for_index() - Get WBM ring number for index
628  * @wlan_cfg_ctx - Configuration Handle
629  * @index: index for which WBM ring numbers is needed
630  *
631  * Return: WBM Ring number for the index
632  */
633 static inline
634 int wlan_cfg_get_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
635 					int index)
636 {
637 	return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
638 }
639 
640 /**
641  * wlan_cfg_get_rbm_id_for_index() - Get WBM RBM ID for TX ring index
642  * @wlan_cfg_ctx - Configuration Handle
643  * @index: TCL index for which WBM rbm value is needed
644  *
645  * The function fills in wbm rbm value corresponding to a TX ring index in
646  * soc->tcl_data_ring. This is needed since WBM ring numbers donot map
647  * sequentially to wbm rbm values.
648  * The function returns rbm id values as stored in tcl_wbm_map_array global
649  * array.
650  *
651  * Return: WBM rbm value corresnponding to TX ring index
652  */
653 static inline
654 int wlan_cfg_get_rbm_id_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, int index)
655 {
656 	return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_rbm_id;
657 }
658 
659 /**
660  * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
661  *				 interrupt context
662  * @wlan_cfg_ctx - Configuration Handle
663  * @context - Numerical ID identifying the Interrupt/NAPI context
664  *
665  * Return: int_rx_ring_mask[context]
666  */
667 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
668 		int context);
669 
670 /**
671  * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
672  *				   mapped to an interrupt context
673  * @wlan_cfg_ctx - Configuration Handle
674  * @context - Numerical ID identifying the Interrupt/NAPI context
675  *
676  * Return: int_rx_mon_ring_mask[context]
677  */
678 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
679 		int context);
680 
681 /**
682  * wlan_cfg_set_tx_mon_ring_mask() - Set Tx monitor ring interrupt mask
683  *				   mapped to an interrupt context
684  * @wlan_cfg_ctx - Configuration Handle
685  * @context - Numerical ID identifying the Interrupt/NAPI context
686  * @mask: Interrupt mask
687  *
688  * Return: None
689  */
690 void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
691 				   int context, int mask);
692 
693 /**
694  * wlan_cfg_get_tx_mon_ring_mask() - Return Tx monitor ring interrupt mask
695  *				   mapped to an interrupt context
696  * @wlan_cfg_ctx - Configuration Handle
697  * @context - Numerical ID identifying the Interrupt/NAPI context
698  *
699  * Return: int_tx_mon_ring_mask[context]
700  */
701 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
702 				  int context);
703 
704 /**
705  * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
706  *				   for the given interrupt context
707  * @wlan_cfg_ctx - Configuration Handle
708  * @context - Numerical ID identifying the Interrupt/NAPI context
709  *
710  */
711 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
712 	int context, int mask);
713 
714 /**
715  * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
716  *				   mapped to an interrupt context
717  * @wlan_cfg_ctx - Configuration Handle
718  * @context - Numerical ID identifying the Interrupt/NAPI context
719  *
720  * Return: int_rxdma2host_ring_mask[context]
721  */
722 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
723 	int context);
724 
725 /**
726  * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
727  *				   for the given interrupt context
728  * @wlan_cfg_ctx - Configuration Handle
729  * @context - Numerical ID identifying the Interrupt/NAPI context
730  *
731  */
732 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
733 	int context, int mask);
734 
735 /**
736  * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
737  *				   mapped to an interrupt context
738  * @wlan_cfg_ctx - Configuration Handle
739  * @context - Numerical ID identifying the Interrupt/NAPI context
740  *
741  * Return: int_host2rxdma_ring_mask[context]
742  */
743 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
744 	int context);
745 
746 /**
747  * wlan_cfg_get_rx_near_full_grp_1_mask() - Return REO near full interrupt mask
748  *					mapped to an interrupt context
749  * @cfg: Configuration Handle
750  * @context - Numerical ID identifying the Interrupt/NAPI context
751  *
752  * Return: REO near full interrupt mask[context]
753  */
754 int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
755 					 int context);
756 
757 /**
758  * wlan_cfg_get_rx_near_full_grp_2_mask() - Return REO near full interrupt mask
759  *					mapped to an interrupt context
760  * @cfg: Configuration Handle
761  * @context - Numerical ID identifying the Interrupt/NAPI context
762  *
763  * Return: REO near full interrupt mask[context]
764  */
765 int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
766 					 int context);
767 
768 /**
769  * wlan_cfg_get_tx_ring_near_full_mask() - Return tx completion ring near full
770  *				interrupt mask mapped to an interrupt context
771  * @cfg: Configuration Handle
772  * @context - Numerical ID identifying the Interrupt/NAPI context
773  *
774  * Return: tx completion near full interrupt mask[context]
775  */
776 int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
777 					int context);
778 /**
779  * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
780  *                                interrupt mask for the given interrupt context
781  * @wlan_cfg_ctx - Configuration Handle
782  * @context - Numerical ID identifying the Interrupt/NAPI context
783  *
784  */
785 void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
786 					   int context, int mask);
787 
788 /**
789  * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
790  *                               interrupt mask mapped to an interrupt context
791  * @wlan_cfg_ctx - Configuration Handle
792  * @context - Numerical ID identifying the Interrupt/NAPI context
793  *
794  * Return: int_host2rxdma_mon_ring_mask[context]
795  */
796 int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
797 					  int context);
798 
799 /**
800  * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
801  *				   destination ring interrupt mask
802  *				   for the given interrupt context
803  * @wlan_cfg_ctx - Configuration Handle
804  * @context - Numerical ID identifying the Interrupt/NAPI context
805  *
806  */
807 void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
808 					   int context, int mask);
809 
810 /**
811  * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
812  *				   destination ring interrupt mask
813  *				   mapped to an interrupt context
814  * @wlan_cfg_ctx - Configuration Handle
815  * @context - Numerical ID identifying the Interrupt/NAPI context
816  *
817  * Return: int_rxdma2host_mon_ring_mask[context]
818  */
819 int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
820 					  int context);
821 
822 /**
823  * wlan_cfg_set_hw_macidx() - Set HW MAC Idx for the given PDEV index
824  *
825  * @wlan_cfg_ctx - Configuration Handle
826  * @pdev_idx - Index of SW PDEV
827  * @hw_macid - HW MAC Id
828  *
829  */
830 void wlan_cfg_set_hw_mac_idx
831 	(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
832 
833 /**
834  * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
835  * PDEV index
836  *
837  * @wlan_cfg_ctx - Configuration Handle
838  * @pdev_idx - Index of SW PDEV
839  *
840  * Return: HW MAC index
841  */
842 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
843 
844 /**
845  * wlan_cfg_get_target_pdev_id() - Get target PDEV ID for HW MAC ID
846  *
847  * @wlan_cfg_ctx - Configuration Handle
848  * @hw_macid - Index of hw mac
849  *
850  * Return: PDEV ID
851  */
852 int
853 wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
854 
855 /**
856  * wlan_cfg_set_pdev_idx() - Set 0 based host PDEV index for the given
857  * hw mac index
858  *
859  * @wlan_cfg_ctx - Configuration Handle
860  * @pdev_idx - Index of SW PDEV
861  * @hw_macid - Index of hw mac
862  *
863  * Return: PDEV index
864  */
865 void wlan_cfg_set_pdev_idx
866 	(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
867 
868 /**
869  * wlan_cfg_get_pdev_idx() - Get 0 based PDEV index for the given
870  * hw mac index
871  *
872  * @wlan_cfg_ctx - Configuration Handle
873  * @hw_macid - Index of hw mac
874  *
875  * Return: PDEV index
876  */
877 int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
878 
879 /**
880  * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
881  *					   mapped to an interrupt context
882  * @wlan_cfg_ctx - Configuration Handle
883  * @context - Numerical ID identifying the Interrupt/NAPI context
884  *
885  * Return: int_rx_err_ring_mask[context]
886  */
887 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
888 				  context);
889 
890 /**
891  * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
892  *					   mapped to an interrupt context
893  * @wlan_cfg_ctx - Configuration Handle
894  * @context - Numerical ID identifying the Interrupt/NAPI context
895  *
896  * Return: int_wbm_rel_ring_mask[context]
897  */
898 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
899 				      context);
900 
901 /**
902  * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
903  *					   mapped to an interrupt context
904  * @wlan_cfg_ctx - Configuration Handle
905  * @context - Numerical ID identifying the Interrupt/NAPI context
906  *
907  * Return: int_reo_status_ring_mask[context]
908  */
909 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
910 				      context);
911 
912 /**
913  * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
914  *				mapped to an interrupt context
915  * @wlan_cfg_ctx - Configuration Handle
916  * @context - Numerical ID identifying the Interrupt/NAPI context
917  *
918  * Return: int_ce_ring_mask[context]
919  */
920 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
921 		int context);
922 
923 /**
924  * wlan_cfg_get_umac_reset_intr_mask() - Get UMAC reset interrupt mask
925  * mapped to an interrupt context
926  * @wlan_cfg_ctx - Configuration Handle
927  * @context - Numerical ID identifying the Interrupt/NAPI context
928  *
929  * Return: int_umac_reset_intr_mask[context]
930  */
931 int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
932 				      int context);
933 /**
934  * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
935  *				supported by device
936  * @wlan_cfg_ctx - Configuration Handle
937  *
938  * Return: max_clients
939  */
940 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
941 
942 /**
943  * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
944  *			    memory allocation request for this device
945  * @wlan_cfg_ctx - Configuration Handle
946  *
947  * Return: max_alloc_size
948  */
949 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
950 
951 /*
952  * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
953  *			       one per radio
954  * @wlan_cfg_ctx - Configuration Handle
955  *
956  * Return: per_pdev_tx_ring
957  */
958 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
959 
960 /*
961  * wlan_cfg_num_tx_comp_rings() - Number of Tx comp rings (HOST mode)
962  * @wlan_cfg_ctx
963  *
964  * Return: num_tx_comp_rings
965  */
966 int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
967 
968 /*
969  * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings (HOST mode)
970  * @wlan_cfg_ctx
971  *
972  * Return: num_tcl_data_rings
973  */
974 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
975 
976 /*
977  * wlan_cfg_num_nss_tcl_data_rings() - Number of TCL Data rings (NSS offload)
978  * @wlan_cfg_ctx
979  *
980  * Return: num_tcl_data_rings
981  */
982 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
983 
984 /*
985  * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
986  *                              one per radio
987  * @wlan_cfg_ctx
988  *
989  * Return: per_pdev_rx_ring
990  */
991 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
992 
993 /*
994  * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
995  *                              one per radio
996  * @wlan_cfg_ctx
997  *
998  * Return: return 1 if per pdev error ring else 0
999  */
1000 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1001 
1002 /*
1003  * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings (HOST mode)
1004  * @wlan_cfg_ctx - Configuration Handle
1005  *
1006  * Return: num_reo_dest_rings
1007  */
1008 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1009 
1010 /*
1011  * wlan_cfg_num_nss_reo_dest_rings() - Number of REO Data rings (NSS offload)
1012  * @wlan_cfg_ctx - Configuration Handle
1013  *
1014  * Return: num_reo_dest_rings
1015  */
1016 int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1017 
1018 /*
1019  * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
1020  * @wlan_cfg_ctx - Configuration Handle
1021  *
1022  * Return: htt_pkt_type_ethernet
1023  */
1024 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1025 
1026 /*
1027  * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
1028  *					device
1029  * @wlan_cfg_ctx - Configuration Handle
1030  *
1031  * Return: num_tx_desc_pool
1032  */
1033 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1034 
1035 /*
1036  * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
1037  *					device
1038  * @wlan_cfg_ctx - Configuration Handle
1039  * @num_pool - Number of pool
1040  */
1041 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
1042 
1043 /*
1044  * wlan_cfg_get_num_tx_ext_desc_pool() -  Number of Tx MSDU ext Descriptor
1045  *					pools
1046  * @wlan_cfg_ctx - Configuration Handle
1047  *
1048  * Return: num_tx_ext_desc_pool
1049  */
1050 int wlan_cfg_get_num_tx_ext_desc_pool(
1051 		struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1052 
1053 /*
1054  * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
1055  *
1056  * @wlan_cfg_ctx - Configuration Handle
1057  *
1058  * Return: reo_dst_ring_size
1059  */
1060 int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1061 
1062 /*
1063  * wlan_cfg_set_num_tx_desc_pool() - Set the REO Destination ring size
1064  *
1065  * @wlan_cfg_ctx - Configuration Handle
1066  * @reo_dst_ring_size - REO Destination ring size
1067  */
1068 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1069 				    int reo_dst_ring_size);
1070 
1071 /*
1072  * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
1073  *
1074  * @wlan_cfg_ctx - Configuration Handle
1075  * @raw_mode_war - raw mode war configuration
1076  */
1077 void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
1078 			       bool raw_mode_war);
1079 
1080 /*
1081  * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
1082  *
1083  * @wlan_cfg_ctx - Configuration Handle
1084  *
1085  * Return: reo_dst_ring_size
1086  */
1087 bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
1088 
1089 /*
1090  * wlan_cfg_set_num_tx_ext_desc_pool() -  Set the number of Tx MSDU ext Descriptor
1091  *					pools
1092  * @wlan_cfg_ctx - Configuration Handle
1093  * @num_pool - Number of pool
1094  */
1095 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
1096 
1097 /*
1098  * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
1099  * @wlan_cfg_ctx - Configuration Handle
1100  *
1101  * Return: num_tx_desc
1102  */
1103 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1104 
1105 /*
1106  * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
1107  * @wlan_cfg_ctx - Configuration Handle
1108  *
1109  * Return: num_tx_desc
1110  */
1111 int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1112 
1113 /*
1114  * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
1115  *
1116  * @wlan_cfg_ctx - Configuration Handle
1117  * @num_desc: Number of descriptor
1118  */
1119 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
1120 
1121 /*
1122  * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
1123  *					per pool
1124  * @wlan_cfg_ctx - Configuration Handle
1125  *
1126  * Return: num_tx_ext_desc
1127  */
1128 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1129 
1130 /*
1131  * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors
1132  *					per pool
1133  * @wlan_cfg_ctx - Configuration Handle
1134  * @num_desc: Number of descriptor
1135  */
1136 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc);
1137 
1138 /*
1139  * wlan_cfg_max_peer_id() - Get maximum peer ID
1140  * @cfg: Configuration Handle
1141  *
1142  * Return: maximum peer ID
1143  */
1144 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
1145 
1146 /*
1147  * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
1148  * @wlan_cfg_pdev_ctx
1149  *
1150  * Return: dma_mon_buf_ring_size
1151  */
1152 int wlan_cfg_get_dma_mon_buf_ring_size(
1153 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1154 
1155 /*
1156  * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
1157  * @wlan_cfg_pdev_ctx
1158  *
1159  * Return: dma_mon_stat_ring_size
1160  */
1161 int wlan_cfg_get_dma_mon_stat_ring_size(
1162 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1163 
1164 /*
1165  * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
1166  * @wlan_cfg_soc_ctx
1167  *
1168  * Return: rxdma monitor desc ring size
1169  */
1170 int
1171 wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
1172 
1173 /*
1174  * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
1175  * @wlan_cfg_pdev_ctx
1176  *
1177  * Return: rx_dma_buf_ring_size
1178  */
1179 int wlan_cfg_get_rx_dma_buf_ring_size(
1180 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1181 
1182 /*
1183  * wlan_cfg_rx_pending_hl_threshold() - Return high threshold of rx pending
1184  * @wlan_cfg_pdev_ctx
1185  *
1186  * Return: rx_pending_high_threshold
1187  */
1188 uint32_t
1189 wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
1190 
1191 /*
1192  * wlan_cfg_rx_pending_lo_threshold() - Return low threshold of rx pending
1193  * @wlan_cfg_pdev_ctx
1194  *
1195  * Return: rx_pending_low_threshold
1196  */
1197 uint32_t
1198 wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
1199 
1200 /*
1201  * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
1202  * per pdev
1203  * @wlan_cfg_pdev_ctx
1204  *
1205  * Return: number of mac DMA rings per pdev
1206  */
1207 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
1208 
1209 /*
1210  * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
1211  * @wlan_cfg_dp_soc_ctxt
1212  *
1213  * Return: true - LRO enabled false - LRO disabled
1214  */
1215 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1216 
1217 /*
1218  * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
1219  * @wlan_cfg_dp_soc_ctxt
1220  *
1221  * Return: true - GRO enabled false - GRO disabled
1222  */
1223 bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1224 
1225 /*
1226  * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
1227  * @wlan_cfg_dp_soc_ctxt
1228  *
1229  * Return: true - enabled false - disabled
1230  */
1231 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1232 
1233 /*
1234  * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
1235  * @wlan_cfg_dp_soc_ctxt
1236  *
1237  * Return: true - enabled false - disabled
1238  */
1239 bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1240 
1241 /*
1242  * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
1243  * @wlan_cfg_soc_ctx
1244  * @rx_hash
1245  */
1246 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
1247 
1248 /*
1249  * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
1250  * @wlan_cfg_pdev_ctx
1251  *
1252  * Return: 1 - enabled 0 - disabled
1253  */
1254 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
1255 
1256 /*
1257  * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
1258  * @wlan_cfg_pdev_ctx
1259  */
1260 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
1261 
1262 /*
1263  * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
1264  * @wlan_cfg_pdev_ctx
1265  *
1266  * Return: nss_cfg
1267  */
1268 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
1269 
1270 /*
1271  * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
1272  * @wlan_cfg_pdev_ctx
1273  *
1274  */
1275 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
1276 
1277 /*
1278  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
1279  * @wlan_cfg_soc_ctx
1280  *
1281  * Return: Batch threshold
1282  */
1283 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
1284 
1285 /*
1286  * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
1287  * @wlan_cfg_soc_ctx
1288  *
1289  * Return: Timer threshold
1290  */
1291 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
1292 
1293 /*
1294  * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
1295  * @wlan_cfg_soc_ctx
1296  *
1297  * Return: Batch threshold
1298  */
1299 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
1300 
1301 /*
1302  * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
1303  * @wlan_cfg_soc_ctx
1304  *
1305  * Return: Timer threshold
1306  */
1307 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
1308 
1309 /*
1310  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
1311  * @wlan_cfg_soc_ctx
1312  *
1313  * Return: Batch threshold
1314  */
1315 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
1316 
1317 /*
1318  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
1319  * @wlan_cfg_soc_ctx
1320  *
1321  * Return: Timer threshold
1322  */
1323 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
1324 
1325 /*
1326  * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs
1327  * @wlan_cfg_soc_ctx
1328  *
1329  * Return: Timer threshold
1330  */
1331 int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg);
1332 
1333 /*
1334  * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
1335  * @wlan_cfg_soc_ctx
1336  *
1337  * Return: Checksum offload enable or disable
1338  */
1339 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1340 
1341 /*
1342  * wlan_cfg_get_nan_checksum_offload - Get checksum offload enable/disable val
1343  * @wlan_cfg_soc_ctx
1344  *
1345  * Return: Checksum offload enable or disable value for NAN mode
1346  */
1347 int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1348 
1349 /*
1350  * wlan_cfg_get_p2p_checksum_offload - Get checksum offload enable/disable val
1351  * @wlan_cfg_soc_ctx
1352  *
1353  * Return: Checksum offload enable or disable value for P2P mode
1354  */
1355 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1356 
1357 /*
1358  * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
1359  * @wlan_cfg_soc_ctx
1360  *
1361  * Return: Tx Ring Size
1362  */
1363 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1364 
1365 /*
1366  * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
1367  * @wlan_cfg_soc_ctx
1368  *
1369  * Return: Tx Completion ring size
1370  */
1371 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1372 
1373 /*
1374  * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
1375  * @wlan_cfg_soc_ctx
1376  *
1377  * Return: wbm_release_ring size
1378  */
1379 int
1380 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1381 
1382 /*
1383  * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
1384  * @wlan_cfg_soc_ctx
1385  *
1386  * Return: tcl_cmd_credit_ring size
1387  */
1388 int
1389 wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1390 
1391 /*
1392  * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
1393  * @wlan_cfg_soc_ctx
1394  *
1395  * Return: tcl_status_ring size
1396  */
1397 int
1398 wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1399 
1400 /*
1401  * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
1402  * @wlan_cfg_soc_ctx
1403  *
1404  * Return: reo_reinject_ring size
1405  */
1406 int
1407 wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1408 
1409 /*
1410  * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
1411  * @wlan_cfg_soc_ctx
1412  *
1413  * Return: rx_release_ring size
1414  */
1415 int
1416 wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1417 
1418 /*
1419  * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
1420  * @wlan_cfg_soc_ctx
1421  *
1422  * Return: reo_exception_ring size
1423  */
1424 int
1425 wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1426 
1427 /*
1428  * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
1429  * @wlan_cfg_soc_ctx
1430  *
1431  * Return: reo_cmd_ring size
1432  */
1433 int
1434 wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1435 
1436 /*
1437  * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
1438  * @wlan_cfg_soc_ctx
1439  *
1440  * Return: reo_status_ring size
1441  */
1442 int
1443 wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1444 
1445 /*
1446  * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
1447  * @wlan_cfg_soc_ctx
1448  *
1449  * Return: tx desc limit for 5G H
1450  */
1451 int
1452 wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
1453 
1454 /*
1455  * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
1456  * @wlan_cfg_soc_ctx
1457  *
1458  * Return: tx desc limit for 2G
1459  */
1460 int
1461 wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
1462 
1463 /*
1464  * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
1465  * @wlan_cfg_soc_ctx
1466  *
1467  * Return: tx desc limit for 5G L
1468  */
1469 int
1470 wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
1471 
1472 /*
1473  * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
1474  * @wlan_cfg_soc_ctx
1475  *
1476  * Return: tx device limit
1477  */
1478 int
1479 wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
1480 
1481 /*
1482  * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
1483  * @wlan_cfg_soc_ctx
1484  *
1485  * Return: tx sw internode queue
1486  */
1487 int
1488 wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
1489 
1490 /*
1491  * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
1492  * @wlan_cfg_soc_ctx
1493  *
1494  * Return: rxdma refill ring size
1495  */
1496 int
1497 wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1498 
1499 /*
1500  * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
1501  * @wlan_cfg_soc_ctx
1502  *
1503  * Return: rxdma error dst ring size
1504  */
1505 int
1506 wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1507 
1508 /*
1509  * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight
1510  * @wlan_cfg_soc_ctx
1511  *
1512  * Return: rx_sw_desc_weight
1513  */
1514 int
1515 wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
1516 
1517 /*
1518  * wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
1519  * @wlan_cfg_soc_ctx
1520  *
1521  * Return: rx_sw_desc_num
1522  */
1523 int
1524 wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
1525 
1526 /*
1527  * wlan_cfg_get_dp_caps - Get dp capablities
1528  * @wlan_cfg_soc_ctx
1529  * @dp_caps: enum for dp capablities
1530  *
1531  * Return: bool if a dp capabilities is enabled
1532  */
1533 bool
1534 wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
1535 		     enum cdp_capabilities dp_caps);
1536 
1537 /**
1538  * wlan_set_srng_cfg() - Fill per ring specific
1539  * configuration parameters
1540  * @wlan_cfg: global srng configuration table
1541  *
1542  * Return: None
1543  */
1544 void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
1545 
1546 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
1547 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
1548 
1549 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
1550 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
1551 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
1552 
1553 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
1554 
1555 /**
1556  * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST
1557  *                                            in number of entries
1558  *
1559  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1560  *
1561  * Return: rx_fst_size
1562  */
1563 uint16_t
1564 wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1565 
1566 /**
1567  * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search
1568  *
1569  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1570  *
1571  * Return: max_search
1572  */
1573 uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg);
1574 
1575 /**
1576  * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST
1577  *                                  search
1578  *
1579  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1580  *
1581  * Return: 320-bit Hash Key
1582  */
1583 uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg);
1584 
1585 /**
1586  * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in
1587  *                                      DP soc context
1588  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1589  * @val: Rx flow tag feature flag value
1590  *
1591  * Return: None
1592  */
1593 void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
1594 				      bool val);
1595 
1596 /**
1597  * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from
1598  *                                     DP soc context
1599  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1600  *
1601  * Return: true if feature is enabled, else false
1602  */
1603 bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1604 
1605 /**
1606  * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that
1607  *                                                Rx FST is per pdev
1608  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1609  * @val: boolean flag indicating Rx FST per pdev or per SOC
1610  *
1611  * Return: None
1612  */
1613 void
1614 wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
1615 					   bool val);
1616 
1617 /**
1618  * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev
1619  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1620  *
1621  * Return: true if Rx FST is per pdev, else false
1622  */
1623 bool
1624 wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg);
1625 
1626 /**
1627  * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context
1628  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1629  * @val: Rx FST size in number of entries
1630  *
1631  * Return: None
1632  */
1633 void
1634 wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1635 				       uint16_t val);
1636 
1637 /**
1638  * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag
1639  *                                                   in DP soc context
1640  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1641  * @val: Rx protocol or flow tag feature flag value in monitor mode from INI
1642  *
1643  * Return: None
1644  */
1645 void
1646 wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
1647 					      bool val);
1648 
1649 /**
1650  * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag
1651  *                                                  from DP soc context
1652  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1653  *
1654  * Return: true if feature is enabled in monitor mode for protocol or flow
1655  * tagging in INI, false otherwise
1656  */
1657 bool
1658 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1659 
1660 /**
1661  * wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
1662  *                                              vdev id check in tx.
1663  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1664  * @val: feature flag value
1665  *
1666  * Return: None
1667  */
1668 void
1669 wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
1670 				      bool val);
1671 
1672 /**
1673  * wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
1674  *                              perpkt vdev id check is enabled in tx.
1675  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1676  *
1677  * Return: true if feature is enabled, false otherwise
1678  */
1679 bool
1680 wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1681 
1682 /**
1683  * wlan_cfg_fill_interrupt_mask() - set interrupt mask
1684  *
1685  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1686  * @num_dp_msi: Number of DP interrupts available (0 for integrated)
1687  * @interrupt_mode: Type of interrupt
1688  * @is_monitor_mode: is monitor mode enabled
1689  *
1690  * Return: void
1691  */
1692 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
1693 				  int num_dp_msi, int interrupt_mode,
1694 				  bool is_monitor_mode);
1695 
1696 /**
1697  * wlan_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
1698  *
1699  *
1700  * @cfg: soc configuration context
1701  *
1702  * Return: true if enabled, false otherwise.
1703  */
1704 bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1705 
1706 /**
1707  * wlan_cfg_is_rx_fisa_lru_del_enabled() - Get Rx FISA LRU del enabled flag
1708  *
1709  *
1710  * @cfg: soc configuration context
1711  *
1712  * Return: true if enabled, false otherwise.
1713  */
1714 bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1715 
1716 /**
1717  * wlan_cfg_is_rx_buffer_pool_enabled() - Get RX buffer pool enabled flag
1718  *
1719  *
1720  * @cfg: soc configuration context
1721  *
1722  * Return: true if enabled, false otherwise.
1723  */
1724 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1725 
1726 /**
1727  * wlan_cfg_is_rx_refill_buffer_pool_enabled() - Get RX refill buffer pool enabled flag
1728  *
1729  *
1730  * @cfg: soc configuration context
1731  *
1732  * Return: true if enabled, false otherwise.
1733  */
1734 bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1735 
1736 
1737 void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
1738 					bool val);
1739 
1740 bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
1741 
1742 /**
1743  * wlan_cfg_get_reo_rings_mapping() - Get Reo destination ring bitmap
1744  *
1745  *
1746  * @cfg: soc configuration context
1747  *
1748  * Return: reo ring bitmap.
1749  */
1750 uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
1751 
1752 /**
1753  * wlan_cfg_set_peer_ext_stats() - set peer extended stats
1754  *
1755  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1756  * @val: Flag value read from INI
1757  *
1758  * Return: void
1759  */
1760 void
1761 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
1762 			    bool val);
1763 
1764 /**
1765  * wlan_cfg_is_peer_ext_stats_enabled() - Check if peer extended
1766  *                                        stats are enabled
1767  *
1768  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1769  *
1770  * Return: bool
1771  */
1772 bool
1773 wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1774 
1775 /**
1776  * wlan_cfg_is_poll_mode_enabled() - Check if poll mode is enabled
1777  *
1778  * @wlan_cfg_dp_soc_ctxt: soc configuration context
1779  *
1780  * Return: bool
1781  */
1782 
1783 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1784 
1785 /**
1786  * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
1787  * @cfg: soc configuration context
1788  *
1789  * Return: true if enabled, false otherwise.
1790  */
1791 bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1792 
1793 /**
1794  * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
1795  * @cfg: soc configuration context
1796  *
1797  * Return: true if enabled, false otherwise.
1798  */
1799 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1800 
1801 #ifdef IPA_OFFLOAD
1802 /*
1803  * wlan_cfg_ipa_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
1804  * @wlan_cfg_soc_ctx: dp cfg context
1805  *
1806  * Return: IPA Tx Ring Size
1807  */
1808 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1809 
1810 /*
1811  * wlan_cfg_ipa_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
1812  * @wlan_cfg_soc_ctx: dp cfg context
1813  *
1814  * Return: IPA Tx Completion ring size
1815  */
1816 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1817 
1818 /*
1819  * wlan_cfg_ipa_tx_alt_ring_size - Get Tx alt DMA ring size (TCL Data Ring)
1820  * @wlan_cfg_soc_ctx: dp cfg context
1821  *
1822  * Return: IPA Tx alt Ring Size
1823  */
1824 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1825 
1826 /*
1827  * wlan_cfg_ipa_tx_alt_comp_ring_size - Get Tx alt comp DMA ring size
1828  *  (TCL Data Ring)
1829  * @wlan_cfg_soc_ctx: dp cfg context
1830  *
1831  * Return: IPA Tx alt comp Ring Size
1832  */
1833 int
1834 wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1835 
1836 #else
1837 static inline
1838 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
1839 {
1840 	return 0;
1841 }
1842 
1843 static inline
1844 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
1845 {
1846 	return 0;
1847 }
1848 #endif
1849 
1850 /**
1851  * wlan_cfg_radio0_default_reo_get -  Get Radio0 default REO
1852  * @cfg: soc configuration context
1853  *
1854  * Return: None
1855  */
1856 uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
1857 
1858 /**
1859  * wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
1860  * @cfg: soc configuration context
1861  *
1862  * Return: None
1863  */
1864 uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
1865 
1866 /**
1867  * wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
1868  * @cfg: soc configuration context
1869  *
1870  * Return: None
1871  */
1872 uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
1873 
1874 /**
1875  * wlan_cfg_set_rxdma1_enable() - Enable rxdma1
1876  * @cfg: soc configuration context
1877  *
1878  * Return: None
1879  */
1880 void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1881 
1882 /**
1883  * wlan_cfg_is_delay_mon_replenish() - Get if delayed monitor replenish
1884  * is enabled
1885  * @cfg: soc configuration context
1886  *
1887  * Return: true if enabled, false otherwise.
1888  */
1889 bool
1890 wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg);
1891 
1892 /**
1893  * wlan_cfg_set_delay_mon_replenish() - Set delayed monitor replenish
1894  * @cfg: soc configuration context
1895  * @val: val to set
1896  *
1897  * Return: None
1898  */
1899 void
1900 wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
1901 
1902 /**
1903  * wlan_cfg_dp_soc_ctx_dump() - Dump few DP cfg soc parameters
1904  * @cfg: soc configuration context
1905  *
1906  * Return:
1907  */
1908 void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
1909 
1910 #ifdef WLAN_SUPPORT_PPEDS
1911 /*
1912  * wlan_cfg_get_dp_soc_is_ppe_enabled() - API to get ppe enable flag
1913  * @wlan_cfg_ctx - Configuration Handle
1914  *
1915  * Return: true if ppe is enabled else return false
1916  */
1917 bool
1918 wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1919 
1920 /*
1921  * wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
1922  * @wlan_cfg_ctx - Configuration Handle
1923  *
1924  * Return: size of reo2ppe ring
1925  */
1926 int
1927 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1928 
1929 /*
1930  * wlan_cfg_get_dp_soc_ppe2tcl_ring_size() - get ppe tx ring size
1931  * @wlan_cfg_ctx - Configuration Handle
1932  *
1933  * Return: size of ppe2tcl ring
1934  */
1935 int
1936 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1937 
1938 /*
1939  * wlan_cfg_get_dp_soc_ppe_release_ring_size() - get ppe tx comp ring size
1940  * @wlan_cfg_ctx - Configuration Handle
1941  *
1942  * Return: size of ppe release ring
1943  */
1944 int
1945 wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1946 #else
1947 static inline bool
1948 wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
1949 {
1950 	return false;
1951 }
1952 
1953 static inline int
1954 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
1955 {
1956 	return 0;
1957 }
1958 
1959 static inline int
1960 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
1961 {
1962 	return 0;
1963 }
1964 
1965 static inline int
1966 wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
1967 {
1968 	return 0;
1969 }
1970 #endif
1971 
1972 /**
1973  * wlan_cfg_get_prealloc_cfg() - Get dp prealloc related cfg param
1974  * @ctrl_psoc - PSOC object
1975  * @cfg - cfg ctx where values will be populated
1976  *
1977  * Return: None
1978  */
1979 void
1980 wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1981 			  struct wlan_dp_prealloc_cfg *cfg);
1982 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
1983 /**
1984  * wlan_cfg_get_pkt_capture_mode() - Get packet capture mode config
1985  * @cfg: config context
1986  *
1987  * Return: value of packet capture mode
1988  */
1989 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg);
1990 #else
1991 static inline
1992 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
1993 {
1994 	return 0;
1995 }
1996 #endif
1997 
1998 /**
1999  * wlan_cfg_get_dp_soc_rx_mon_buf_ring_size() - Rx MON buf ring size
2000  * @cfg:  Configuration Handle
2001  *
2002  * Return: Size of Rx MON buf ring size
2003  */
2004 uint32_t
2005 wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2006 
2007 /**
2008  * wlan_cfg_get_dp_soc_tx_mon_buf_ring_size() - Tx MON buf ring size
2009  * @cfg:  Configuration Handle
2010  *
2011  * Return: Size of Tx MON buf ring size
2012  */
2013 uint32_t
2014 wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2015 
2016 /**
2017  * wlan_cfg_get_dma_rx_mon_dest_ring_size() - Rx MON dest ring size
2018  * @cfg:  Configuration Handle
2019  *
2020  * Return: Size of Rx MON dest ring size
2021  */
2022 int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
2023 
2024 /**
2025  * wlan_cfg_get_dma_tx_mon_dest_ring_size() - Tx MON dest ring size
2026  * @cfg:  Configuration Handle
2027  *
2028  * Return: Size of Tx MON dest ring size
2029  */
2030 int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
2031 
2032 /*
2033  * wlan_cfg_get_rx_rel_ring_id() - get wbm2sw ring id for Rx release ring
2034  * @wlan_cfg_ctx - Configuration Handle
2035  *
2036  * Return: wbm2sw ring id
2037  */
2038 uint8_t
2039 wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg);
2040 
2041 /**
2042  * wlan_cfg_set_rx_rel_ring_id() - set wbm2sw ring id for Rx release ring
2043  * @cfg: soc configuration context
2044  *
2045  * Return: None
2046  */
2047 void
2048 wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
2049 			    uint8_t wbm2sw_ring_id);
2050 
2051 /**
2052  * wlan_cfg_set_vdev_stats_hw_offload_config() - Set hw vdev stats offload
2053  *						 config
2054  * @cfg: config context
2055  * @value: value to be set
2056  *
2057  * Return: none
2058  */
2059 void
2060 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
2061 					  bool value);
2062 
2063 /**
2064  * wlan_cfg_get_vdev_stats_hw_offload_config() - Get hw vdev stats offload
2065  *						 config
2066  * @cfg: config context
2067  *
2068  * Return: value of hw vdev stats config
2069  */
2070 bool
2071 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg);
2072 
2073 /**
2074  * wlan_cfg_get_vdev_stats_hw_offload_timer()- Get hw vdev stats timer duration
2075  * @cfg: config context
2076  *
2077  * Return: value of hw vdev stats timer duration
2078  */
2079 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg);
2080 
2081 /**
2082  * wlan_cfg_set_sawf_config() - Set SAWF config enable/disable
2083  * @cfg: config context
2084  * @value: value to be set
2085  *
2086  * Return: none
2087  */
2088 void
2089 wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool value);
2090 
2091 /**
2092  * wlan_cfg_get_sawf_config() - Get SAWF config enable/disable
2093  * @cfg: config context
2094  *
2095  * Return: true or false
2096  */
2097 bool
2098 wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg);
2099 
2100 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
2101 /**
2102  * wlan_cfg_mlo_rx_ring_map_get_by_chip_id() - get rx ring map
2103  * @cfg: soc configuration context
2104  * @chip_id: mlo_chip_id
2105  *
2106  * Return: rx_ring_map
2107  */
2108 uint8_t
2109 wlan_cfg_mlo_rx_ring_map_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
2110 					uint8_t chip_id);
2111 
2112 /**
2113  * wlan_cfg_mlo_default_rx_ring_get_by_chip_id() - get default RX ring
2114  * @cfg: soc configuration context
2115  * @chip_id: mlo_chip_id
2116  *
2117  * Return: default rx ring
2118  */
2119 uint8_t
2120 wlan_cfg_mlo_default_rx_ring_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
2121 					    uint8_t chip_id);
2122 
2123 /**
2124  * wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id() - get chip's lmac_peer_id_msb
2125  * @cfg: soc configuration context
2126  * @chip_id: mlo_chip_id
2127  *
2128  * Return: lmac_peer_id_msb
2129  */
2130 uint8_t
2131 wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
2132 					     uint8_t chip_id);
2133 
2134 #endif
2135 
2136 /*
2137  * wlan_cfg_set_host2txmon_ring_mask() - Set host2txmon ring
2138  *                               interrupt mask mapped to an interrupt context
2139  * @wlan_cfg_ctx - Configuration Handle
2140  *
2141  * Return: None
2142  */
2143 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
2144 				       int context, int mask);
2145 /**
2146  * wlan_cfg_get_host2txmon_ring_mask() - Return host2txmon ring
2147  *                               interrupt mask mapped to an interrupt context
2148  * @wlan_cfg_ctx - Configuration Handle
2149  * @context - Numerical ID identifying the Interrupt/NAPI context
2150  *
2151  * Return: int_host2txmon_ring_mask[context]
2152  */
2153 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
2154 				      int context);
2155 /**
2156  * wlan_cfg_set_txmon_hw_support () - Set txmon hw support
2157  * @cfg:  Configuration Handle
2158  * @txmon_hw_support: value to set
2159  *
2160  * Return: None
2161  */
2162 void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
2163 				   bool txmon_hw_support);
2164 
2165 /**
2166  * wlan_cfg_get_txmon_hw_support () - Get txmon hw support
2167  * @cfg:  Configuration Handle
2168  *
2169  * Return: txmon_hw_support
2170  */
2171 bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg);
2172 
2173 #ifdef WLAN_TX_PKT_CAPTURE_ENH
2174 /*
2175  * wlan_cfg_get_tx_capt_max_mem - Get max memory allowed for TX capture feature
2176  * @wlan_cfg_soc_ctx
2177  *
2178  * Return: user given size in bytes
2179  */
2180 static inline int
2181 wlan_cfg_get_tx_capt_max_mem(struct wlan_cfg_dp_soc_ctxt *cfg)
2182 {
2183 	return cfg->tx_capt_max_mem_allowed;
2184 }
2185 #endif /* WLAN_TX_PKT_CAPTURE_ENH */
2186 
2187 /**
2188  * wlan_cfg_get_napi_scale_factor() - Get napi scale factor
2189  *
2190  *
2191  * @cfg: soc configuration context
2192  *
2193  * Return: napi scale factor
2194  */
2195 uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg);
2196 
2197 #endif /*__WLAN_CFG_H*/
2198