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