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