xref: /wlan-driver/qca-wifi-host-cmn/wlan_cfg/wlan_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 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 4
104 #define WLAN_MAX_MLO_LINKS_PER_SOC 2
105 #else
106 #define WLAN_MAX_MLO_CHIPS 1
107 #endif
108 
109 #define UMAC_RESET_IPC 451
110 
111 struct wlan_cfg_dp_pdev_ctxt;
112 
113 /**
114  * struct wlan_cfg_tcl_wbm_ring_num_map - TCL WBM Ring number mapping
115  * @tcl_ring_num: TCL Ring number
116  * @wbm_ring_num: WBM Ring number
117  * @wbm_rbm_id: WBM RBM ID to be used when enqueuing to TCL
118  * @for_ipa: whether this TCL/WBM for IPA use or not
119  */
120 struct wlan_cfg_tcl_wbm_ring_num_map {
121 	uint8_t tcl_ring_num;
122 	uint8_t wbm_ring_num;
123 	uint8_t wbm_rbm_id;
124 	uint8_t for_ipa;
125 };
126 
127 /**
128  * struct wlan_srng_cfg - Per ring configuration parameters
129  * @timer_threshold: Config to control interrupts based on timer duration
130  * @batch_count_threshold: Config to control interrupts based on
131  * number of packets in the ring
132  * @low_threshold: Config to control low threshold interrupts for SRC rings
133  */
134 struct wlan_srng_cfg {
135 	uint32_t timer_threshold;
136 	uint32_t batch_count_threshold;
137 	uint32_t low_threshold;
138 };
139 
140 /**
141  * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
142  * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
143  * @max_clients: Maximum number of peers/stations supported by device
144  * @max_alloc_size: Maximum allocation size for any dynamic memory
145  *			allocation request for this device
146  * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
147  *		       1: Each TCL ring is mapped to one radio/pdev
148  * @num_tx_comp_rings: Number of Tx comp rings supported by device
149  * @num_tcl_data_rings: Number of TCL Data rings supported by device
150  * @num_nss_tcl_data_rings:
151  * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
152  *		       1: Each REO ring is mapped to one radio/pdev
153  * @per_pdev_lmac_ring:
154  * @num_reo_dest_rings:
155  * @num_nss_reo_dest_rings:
156  * @num_tx_desc_pool: Number of Tx Descriptor pools
157  * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
158  * @num_global_tx_desc: Number of Global Tx Descriptors allowed
159  * @num_global_spcl_tx_desc: Number of Global special Tx Descriptors allowed
160  * @num_tx_desc: Number of Tx Descriptors per pool
161  * @num_tx_spl_desc: Number of Tx Descriptors per pool to handle special frames
162  * @min_tx_desc: Minimum number of Tx Descriptors per pool
163  * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
164  * @max_peer_id: Maximum value of peer id that FW can assign for a client
165  * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
166  * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
167  * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
168  * @int_batch_threshold_ppe2tcl:
169  * @int_timer_threshold_ppe2tcl:
170  * @int_batch_threshold_tx:
171  * @int_timer_threshold_tx:
172  * @int_batch_threshold_rx:
173  * @int_timer_threshold_rx:
174  * @int_batch_threshold_other:
175  * @int_timer_threshold_other:
176  * @int_batch_threshold_mon_dest: Batch threshold counter for monitor dest
177  * @int_timer_threshold_mon_dest: Timer threshold counter for monitor dest
178  * @tx_ring_size:
179  * @time_control_bp:
180  * @rx_buffer_size: skb size
181  * @qref_control_size: list size for memory history arrays
182  * @tx_comp_ring_size:
183  * @tx_comp_ring_size_nss:
184  * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
185  *			  NAPI/Intr context
186  * @int_tx_mon_ring_mask: Bitmap of Tx monitor ring interrupts mapped to each
187  *			  NAPI/Intr context
188  * @int_host2rxdma_mon_ring_mask:
189  * @int_rxdma2host_mon_ring_mask:
190  * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
191  * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
192  *			  NAPI/Intr context
193  * @int_rx_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
194  *			      NAPI/Intr context
195  * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
196  *                            each NAPI/Intr context
197  * @int_rxdma2host_ring_mask:
198  * @int_host2rxdma_ring_mask:
199  * @int_rx_ring_near_full_irq_1_mask: Bitmap of REO DST ring near full interrupt
200  *				mapped to each NAPI/INTR context
201  * @int_rx_ring_near_full_irq_2_mask: Bitmap of REO DST ring near full interrupt
202  *				mapped to each NAPI/INTR context
203  * @int_tx_ring_near_full_irq_mask: Bitmap of Tx completion ring near full
204  *				interrupt mapped to each NAPI/INTR context
205  * @int_host2txmon_ring_mask: Bitmap of Tx monitor source ring interrupt
206  *				mapped to each NAPI/INTR context
207  * @int_ppeds_wbm_release_ring_mask:
208  * @int_ppe2tcl_ring_mask:
209  * @int_reo2ppe_ring_mask:
210  * @int_umac_reset_intr_mask: Bitmap of UMAC reset interrupt mapped to each
211  * NAPI/INTR context
212  * @hw_macid:
213  * @hw_macid_pdev_id_map:
214  * @base_hw_macid:
215  * @rx_hash: Enable hash based steering of rx packets
216  * @tso_enabled: enable/disable tso feature
217  * @lro_enabled: enable/disable LRO feature
218  * @sg_enabled: enable disable scatter gather feature
219  * @gro_enabled: enable disable GRO feature
220  * @tc_based_dynamic_gro: enable/disable tc based dynamic gro
221  * @tc_ingress_prio: ingress prio to be checked for dynamic gro
222  * @ipa_enabled: Flag indicating if IPA is enabled
223  * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
224  * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
225  * @rawmode_enabled: Flag indicating if RAW mode is enabled
226  * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
227  * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
228  * @p2p_tcp_udp_checksumoffload: enable/disable checksum offload for P2P mode
229  * @nan_tcp_udp_checksumoffload: enable/disable checksum offload for NAN mode
230  * @tcp_udp_checksumoffload: enable/disable checksum offload
231  * @legacy_mode_checksumoffload_disable:
232  * @defrag_timeout_check:
233  * @nss_cfg: nss configuration
234  * @tx_flow_stop_queue_threshold:
235  * @tx_flow_start_queue_offset:
236  * @rx_defrag_min_timeout: rx defrag minimum timeout
237  * @reo_dst_ring_size:
238  * @wbm_release_ring: wbm release ring size
239  * @tcl_cmd_credit_ring: tcl command/credit ring size
240  * @tcl_status_ring: tcl status ring size
241  * @reo_reinject_ring: reo reinject ring
242  * @rx_release_ring: rx release ring size
243  * @reo_exception_ring: reo exception ring size
244  * @reo_cmd_ring: reo cmd ring size
245  * @reo_status_ring: reo status ting size
246  * @rxdma_refill_ring: rxdma refill ring size
247  * @rxdma_refill_lt_disable: rxdma refill low threshold disable
248  * @rxdma_err_dst_ring: rxdma error destination ring size
249  * @per_pkt_trace:
250  * @raw_mode_war: enable/disable raw mode war
251  * @enable_data_stall_detection: enable/disable specific data stall detection
252  * @disable_intra_bss_fwd: flag to disable intra bss forwarding
253  * @rxdma1_enable: flag to indicate if rxdma1 is enabled
254  * @delay_mon_replenish: delay monitor buffer replenish
255  * @max_ast_idx:
256  * @tx_desc_limit_0: tx_desc limit for 5 GHz High
257  * @tx_desc_limit_1: tx_desc limit for 2 GHz
258  * @tx_desc_limit_2: tx_desc limit for 5 GHz Low
259  * @tx_device_limit: tx device limit
260  * @tx_spl_device_limit: tx device limit for special frames
261  * @tx_sw_internode_queue: tx sw internode queue
262  * @mon_drop_thresh:
263  * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
264  * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
265  * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
266  * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
267  *                            dp_rx_process loop
268  * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
269  *                                at end of tx_comp_handler loop.
270  * @rx_sw_desc_weight: rx sw descriptor weight configuration
271  * @rx_sw_desc_num:
272  * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or
273  *                                       flow tagging in monitor/mon-lite mode
274  * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE
275  * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev
276  *                                    table should be used
277  * @rx_flow_search_table_size: indicates the number of flows in the flow search
278  *                             table
279  * @rx_flow_max_search: max skid length for each hash entry
280  * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
281  *                        5 tuple flow entry
282  * @pktlog_buffer_size: packet log buffer size
283  * @is_rx_fisa_enabled: flag to enable/disable FISA Rx
284  * @is_rx_fisa_lru_del_enabled:
285  * @is_tso_desc_attach_defer:
286  * @delayed_replenish_entries:
287  * @reo_rings_mapping:
288  * @rx_rings_mapping: DP RX rings mapping mask
289  * @pext_stats_enabled: Flag to enable and disabled peer extended stats
290  * @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
291  *                           pool support
292  * @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
293  *                           pool support
294  * @enable_dp_buf_page_frag_alloc: Flag to control DP allocation from page frag
295  *				   cache.
296  * @rx_refill_buff_pool_size: RX refill buffer pool size
297  * @rx_pending_high_threshold: threshold of starting pkt drop
298  * @rx_pending_low_threshold: threshold of stopping pkt drop
299  * @is_poll_mode_enabled:
300  * @is_swlm_enabled: flag to enable/disable SWLM
301  * @fst_in_cmem:
302  * @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
303  * @radio0_rx_default_reo:
304  * @radio1_rx_default_reo:
305  * @radio2_rx_default_reo:
306  * @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
307  * @jitter_stats_enabled: true if jitter stats are enabled
308  * @peer_link_stats_enabled: true if MLO Peer Link stats are enabled
309  * @ipa_tx_ring_size: IPA tx ring size
310  * @ipa_tx_comp_ring_size: IPA tx completion ring size
311  * @ipa_tx_alt_ring_size: IPA tx alt ring size
312  * @ipa_tx_alt_comp_ring_size: IPA tx alt completion ring size
313  * @hw_cc_enabled: cookie conversion enabled
314  * @tcl_wbm_map_array: TCL-WBM map array
315  * @ppeds_enable: Enable PPE Direct Switch feature
316  * @reo2ppe_ring: REO2PPE ring size
317  * @ppe2tcl_ring: PPE2TCL ring size
318  * @ppeds_num_tx_desc: Number of tx descs for PPE DS
319  * @ppeds_tx_comp_napi_budget: Napi budget for tx completions
320  * @ppeds_tx_desc_hotlist_len: PPE DS tx desc hotlist max length
321  * @pkt_capture_mode: Packet capture mode config
322  * @rx_mon_buf_ring_size: Rx monitor buf ring size
323  * @tx_mon_buf_ring_size: Tx monitor buf ring size
324  * @rx_rel_wbm2sw_ring_id: Rx WBM2SW ring id
325  * @tx_rings_grp_bitmap: bitmap of group intr contexts which have
326  *                       non-zero tx ring mask
327  * @mlo_chip_rx_ring_map: map of chip_id to rx ring map
328  * @vdev_stats_hw_offload_config: HW vdev stats config
329  * @vdev_stats_hw_offload_timer: HW vdev stats timer duration
330  * @num_rxdma_dst_rings_per_pdev: Number of Rx DMA rings per pdev
331  * @txmon_hw_support: TxMON HW support
332  * @txmon_sw_peer_filtering: TxMON sw peer filtering support
333  * @num_rxdma_status_rings_per_pdev: Num RXDMA status rings
334  * @tx_capt_max_mem_allowed: Max memory for Tx packet capture
335  * @tx_capt_rbm_id: Return Buffer Manager ID to be used for Tx packet capture
336  * @sawf_enabled:  Is SAWF enabled
337  * @sawf_stats: SAWF Statistics
338  * @mpdu_retry_threshold_1: MPDU retry threshold 1 to increment tx bad count
339  * @mpdu_retry_threshold_2: MPDU retry threshold 2 to increment tx bad count
340  * @napi_scale_factor: scaling factor to be used for napi polls
341  * @notify_frame_support: flag indicating capability to mark notify frames
342  * @is_handle_invalid_decap_type_disabled: flag to indicate if invalid decap
343  *                                         type handling is disabled
344  * @tx_pkt_inspect_for_ilp: flag to indicate if TX packet inspection for HW
345  *			    based ILP feature is enabled
346  * @pointer_timer_threshold_rx: RX REO2SW ring pointer update timer threshold
347  * @pointer_num_threshold_rx: RX REO2SW ring pointer update entries threshold
348  * @local_pkt_capture: flag indicating enable/disable of local packet capture
349  * @special_frame_msk: Special frame mask
350  * @rx_rr: rx round robin enable / disable
351  * @umac_reset_buffer_window: Buffer time to check if umac reset was in progress
352  *                            during this window, configured time is in
353  *                            milliseconds.
354  * @fw_ast_indication_disable: Disable AST
355  * @avg_rate_stats_filter_val: Average rate filter value for stats.
356  *
357  */
358 struct wlan_cfg_dp_soc_ctxt {
359 	int num_int_ctxts;
360 	int max_clients;
361 	int max_alloc_size;
362 	int per_pdev_tx_ring;
363 	int num_tx_comp_rings;
364 	int num_tcl_data_rings;
365 	int num_nss_tcl_data_rings;
366 	int per_pdev_rx_ring;
367 	int per_pdev_lmac_ring;
368 	int num_reo_dest_rings;
369 	int num_nss_reo_dest_rings;
370 	int num_tx_desc_pool;
371 	int num_tx_ext_desc_pool;
372 	int num_global_tx_desc;
373 	int num_global_spcl_tx_desc;
374 	int num_tx_desc;
375 	int num_tx_spl_desc;
376 	int min_tx_desc;
377 	int num_tx_ext_desc;
378 	int max_peer_id;
379 	int htt_packet_type;
380 	int int_batch_threshold_ppe2tcl;
381 	int int_timer_threshold_ppe2tcl;
382 	int int_batch_threshold_tx;
383 	int int_timer_threshold_tx;
384 	int int_batch_threshold_rx;
385 	int int_timer_threshold_rx;
386 	int int_batch_threshold_other;
387 	int int_timer_threshold_other;
388 	int int_batch_threshold_mon_dest;
389 	int int_timer_threshold_mon_dest;
390 	int tx_ring_size;
391 	int time_control_bp;
392 	int rx_buffer_size;
393 	int qref_control_size;
394 	int tx_comp_ring_size;
395 	int tx_comp_ring_size_nss;
396 	uint8_t int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
397 	uint8_t int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
398 	uint8_t int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
399 	uint8_t int_tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
400 	uint8_t int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
401 	uint8_t int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
402 	uint8_t int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
403 	uint8_t int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
404 	uint8_t int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
405 	uint8_t int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
406 	uint8_t int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
407 	uint8_t int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
408 	uint8_t int_rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
409 	uint8_t int_rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
410 	uint8_t int_tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
411 	uint8_t int_host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
412 	uint8_t int_ppeds_wbm_release_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
413 	uint8_t int_ppe2tcl_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
414 	uint8_t int_reo2ppe_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
415 	uint8_t int_umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS];
416 	int hw_macid[MAX_PDEV_CNT];
417 	int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
418 	int base_hw_macid;
419 	bool rx_hash;
420 	bool tso_enabled;
421 	bool lro_enabled;
422 	bool sg_enabled;
423 	bool gro_enabled;
424 	bool tc_based_dynamic_gro;
425 	uint32_t tc_ingress_prio;
426 	bool ipa_enabled;
427 	bool ol_tx_csum_enabled;
428 	bool ol_rx_csum_enabled;
429 	bool rawmode_enabled;
430 	bool peer_flow_ctrl_enabled;
431 	bool napi_enabled;
432 	bool p2p_tcp_udp_checksumoffload;
433 	bool nan_tcp_udp_checksumoffload;
434 	bool tcp_udp_checksumoffload;
435 	bool legacy_mode_checksumoffload_disable;
436 	bool defrag_timeout_check;
437 	int nss_cfg;
438 	uint32_t tx_flow_stop_queue_threshold;
439 	uint32_t tx_flow_start_queue_offset;
440 	int rx_defrag_min_timeout;
441 	int reo_dst_ring_size;
442 	int wbm_release_ring;
443 	int tcl_cmd_credit_ring;
444 	int tcl_status_ring;
445 	int reo_reinject_ring;
446 	int rx_release_ring;
447 	int reo_exception_ring;
448 	int reo_cmd_ring;
449 	int reo_status_ring;
450 	int rxdma_refill_ring;
451 	bool rxdma_refill_lt_disable;
452 	int rxdma_err_dst_ring;
453 	uint32_t per_pkt_trace;
454 	bool raw_mode_war;
455 	uint32_t enable_data_stall_detection;
456 	bool disable_intra_bss_fwd;
457 	bool rxdma1_enable;
458 	bool delay_mon_replenish;
459 	int max_ast_idx;
460 	int tx_desc_limit_0;
461 	int tx_desc_limit_1;
462 	int tx_desc_limit_2;
463 	int tx_device_limit;
464 	int tx_spl_device_limit;
465 	int tx_sw_internode_queue;
466 	int mon_drop_thresh;
467 #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
468 	uint32_t tx_comp_loop_pkt_limit;
469 	uint32_t rx_reap_loop_pkt_limit;
470 	uint32_t rx_hp_oos_update_limit;
471 	bool rx_enable_eol_data_check;
472 	bool tx_comp_enable_eol_data_check;
473 #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
474 	int rx_sw_desc_weight;
475 	int rx_sw_desc_num;
476 	bool is_rx_mon_protocol_flow_tag_enabled;
477 	bool is_rx_flow_tag_enabled;
478 	bool is_rx_flow_search_table_per_pdev;
479 	uint16_t rx_flow_search_table_size;
480 	uint16_t rx_flow_max_search;
481 	uint8_t *rx_toeplitz_hash_key;
482 	uint8_t pktlog_buffer_size;
483 	bool is_tso_desc_attach_defer;
484 	uint32_t delayed_replenish_entries;
485 	uint32_t reo_rings_mapping;
486 	uint32_t rx_rings_mapping;
487 	bool pext_stats_enabled;
488 	bool is_rx_buff_pool_enabled;
489 	bool is_rx_refill_buff_pool_enabled;
490 	bool enable_dp_buf_page_frag_alloc;
491 	int rx_refill_buff_pool_size;
492 	uint32_t rx_pending_high_threshold;
493 	uint32_t rx_pending_low_threshold;
494 	bool is_poll_mode_enabled;
495 	uint8_t is_swlm_enabled;
496 	bool fst_in_cmem;
497 	bool tx_per_pkt_vdev_id_check;
498 	uint8_t radio0_rx_default_reo;
499 	uint8_t radio1_rx_default_reo;
500 	uint8_t radio2_rx_default_reo;
501 	bool wow_check_rx_pending_enable;
502 	bool jitter_stats_enabled;
503 	bool peer_link_stats_enabled;
504 #ifdef IPA_OFFLOAD
505 	uint32_t ipa_tx_ring_size;
506 	uint32_t ipa_tx_comp_ring_size;
507 #ifdef IPA_WDI3_TX_TWO_PIPES
508 	int ipa_tx_alt_ring_size;
509 	int ipa_tx_alt_comp_ring_size;
510 #endif /* IPA_WDI3_TX_TWO_PIPES */
511 #endif /* IPA_OFFLOAD */
512 	bool hw_cc_enabled;
513 	struct wlan_cfg_tcl_wbm_ring_num_map *tcl_wbm_map_array;
514 #ifdef WLAN_SUPPORT_PPEDS
515 	bool ppeds_enable;
516 	int reo2ppe_ring;
517 	int ppe2tcl_ring;
518 	int ppeds_num_tx_desc;
519 	int ppeds_tx_comp_napi_budget;
520 	int ppeds_tx_desc_hotlist_len;
521 #endif
522 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
523 	uint32_t pkt_capture_mode;
524 #endif
525 	uint32_t rx_mon_buf_ring_size;
526 	uint32_t tx_mon_buf_ring_size;
527 	uint8_t rx_rel_wbm2sw_ring_id;
528 	uint32_t tx_rings_grp_bitmap;
529 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
530 	uint8_t mlo_chip_rx_ring_map;
531 #endif
532 #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
533 	bool vdev_stats_hw_offload_config;
534 	int vdev_stats_hw_offload_timer;
535 #endif
536 	uint8_t num_rxdma_dst_rings_per_pdev;
537 	bool txmon_hw_support;
538 	bool txmon_sw_peer_filtering;
539 	uint8_t num_rxdma_status_rings_per_pdev;
540 #ifdef WLAN_TX_PKT_CAPTURE_ENH
541 	uint32_t tx_capt_max_mem_allowed;
542 	uint8_t tx_capt_rbm_id[MAX_PDEV_CNT];
543 #endif
544 #ifdef CONFIG_SAWF
545 	bool sawf_enabled;
546 #endif
547 #ifdef CONFIG_SAWF_STATS
548 	uint8_t sawf_stats;
549 #endif
550 	uint8_t mpdu_retry_threshold_1;
551 	uint8_t mpdu_retry_threshold_2;
552 	uint8_t napi_scale_factor;
553 	uint8_t notify_frame_support;
554 	bool is_handle_invalid_decap_type_disabled;
555 #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
556 	bool tx_pkt_inspect_for_ilp;
557 #endif
558 	uint16_t pointer_timer_threshold_rx;
559 	uint8_t pointer_num_threshold_rx;
560 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
561 	bool local_pkt_capture;
562 #endif
563 	uint32_t special_frame_msk;
564 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
565 	bool rx_rr;
566 #endif
567 #ifdef DP_UMAC_HW_RESET_SUPPORT
568 	uint32_t umac_reset_buffer_window;
569 #endif
570 	bool fw_ast_indication_disable;
571 	uint16_t avg_rate_stats_filter_val;
572 };
573 
574 /**
575  * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
576  * @rx_dma_buf_ring_size: Size of RxDMA buffer ring
577  * @dma_mon_buf_ring_size: Size of RxDMA Monitor buffer ring
578  * @dma_rx_mon_dest_ring_size: Size of RxDMA Monitor Destination ring
579  * @dma_tx_mon_dest_ring_size: Size of Tx Monitor Destination ring
580  * @dma_mon_status_ring_size: Size of RxDMA Monitor Status ring
581  * @rxdma_monitor_desc_ring: rxdma monitor desc ring size
582  * @num_mac_rings: Number of mac rings
583  * @nss_enabled: 1 - NSS enabled, 0 - NSS disabled
584  * @dma_tx_mon_buf_ring_size: Tx monitor BUF Ring size
585  * @sw2rxdma_link_ring_size: SW2RXDMA link ring size
586  */
587 struct wlan_cfg_dp_pdev_ctxt {
588 	int rx_dma_buf_ring_size;
589 	int dma_mon_buf_ring_size;
590 	int dma_rx_mon_dest_ring_size;
591 	int dma_tx_mon_dest_ring_size;
592 	int dma_mon_status_ring_size;
593 	int rxdma_monitor_desc_ring;
594 	int num_mac_rings;
595 	int nss_enabled;
596 	int dma_tx_mon_buf_ring_size;
597 	int sw2rxdma_link_ring_size;
598 };
599 
600 /**
601  * struct wlan_dp_prealloc_cfg - DP prealloc related config
602  * @num_tx_ring_entries: num of tcl data ring entries
603  * @num_tx_comp_ring_entries: num of tx comp ring entries
604  * @num_wbm_rel_ring_entries: num of wbm err ring entries
605  * @num_rxdma_err_dst_ring_entries: num of rxdma err ring entries
606  * @num_reo_exception_ring_entries: num of rx exception ring entries
607  * @num_tx_desc: num of tx descriptors
608  * @num_tx_ext_desc: num of tx ext descriptors
609  * @num_rx_sw_desc: number of rx sw descriptors
610  * @num_reo_dst_ring_entries: Number of entries in REO destination ring
611  * @num_rxdma_buf_ring_entries: Number of entries in rxdma buf ring
612  * @num_rxdma_refill_ring_entries: Number of entries in rxdma refill ring
613  * @num_reo_status_ring_entries: Number of entries in REO status ring
614  * @num_mon_status_ring_entries: Number of entries in monitor status ring
615  * @num_tx_mon_buf_ring_entries: Number of entries in Tx monitor buf ring
616  * @num_tx_mon_dst_ring_entries: Number of entries in Tx monitor
617  *				 destination ring
618  */
619 struct wlan_dp_prealloc_cfg {
620 	int num_tx_ring_entries;
621 	int num_tx_comp_ring_entries;
622 	int num_wbm_rel_ring_entries;
623 	int num_rxdma_err_dst_ring_entries;
624 	int num_reo_exception_ring_entries;
625 	int num_tx_desc;
626 	int num_tx_ext_desc;
627 	int num_rx_sw_desc;
628 	int num_reo_dst_ring_entries;
629 	int num_rxdma_buf_ring_entries;
630 	int num_rxdma_refill_ring_entries;
631 	int num_reo_status_ring_entries;
632 	int num_mon_status_ring_entries;
633 	int num_tx_mon_buf_ring_entries;
634 	int num_tx_mon_dst_ring_entries;
635 };
636 
637 /**
638  * wlan_cfg_soc_attach() - Attach configuration interface for SoC
639  * @psoc: PSOC object
640  *
641  * Allocates context for Soc configuration parameters,
642  * Read configuration information from device tree/ini file and
643  * returns back handle
644  *
645  * Return: Handle to configuration context
646  */
647 struct wlan_cfg_dp_soc_ctxt *
648 wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc);
649 
650 /**
651  * wlan_cfg_soc_detach() - Detach soc configuration handle
652  * @wlan_cfg_ctx: soc configuration handle
653  *
654  * De-allocates memory allocated for SoC configuration
655  *
656  * Return:none
657  */
658 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
659 
660 /**
661  * wlan_cfg_pdev_attach() - Attach configuration interface for pdev
662  * @ctrl_obj: PSOC object
663  *
664  * Allocates context for pdev configuration parameters,
665  * Read configuration information from device tree/ini file and
666  * returns back handle
667  *
668  * Return: Handle to configuration context
669  */
670 struct wlan_cfg_dp_pdev_ctxt *
671 wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
672 
673 /**
674  * wlan_cfg_pdev_detach() - Detach and free pdev configuration handle
675  * @wlan_cfg_pdev_ctx: PDEV Configuration Handle
676  *
677  * Return: void
678  */
679 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
680 
681 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
682 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
683 			       int context, int mask);
684 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
685 			       int context, int mask);
686 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
687 				   int context, int mask);
688 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
689 			       int context, int mask);
690 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
691 				  int mask);
692 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
693 void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
694 int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
695 int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg);
696 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
697 				int context, int mask);
698 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
699 					int context, int mask);
700 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
701 					int context, int mask);
702 
703 /**
704  * wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
705  *				for monitor buffer ring at initialization
706  * @wlan_cfg_ctx: Configuration Handle
707  * @replenish_entries: number of entries to replenish at initialization
708  *
709  */
710 void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
711 						*wlan_cfg_ctx,
712 						uint32_t replenish_entries);
713 
714 /**
715  * wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
716  *				for monitor buffer ring at initialization
717  * @wlan_cfg_ctx: Configuration Handle
718  *
719  * Return: delayed_replenish_entries;
720  */
721 int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
722 					       *wlan_cfg_ctx);
723 /**
724  * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
725  * @wlan_cfg_ctx: Configuration Handle
726  *
727  * For WIN,  DP_NUM_INTERRUPT_CONTEXTS will be equal to  number of CPU cores.
728  * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
729  * rx_ring_mask ,and rx_monitor_ring mask  to indicate the rings
730  * that are processed by the handler.
731  *
732  * Return: num_contexts
733  */
734 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
735 
736 /**
737  * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
738  *				 interrupt context
739  * @wlan_cfg_ctx: Configuration Handle
740  * @context: Numerical ID identifying the Interrupt/NAPI context
741  *
742  * Return: int_tx_ring_mask[context]
743  */
744 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
745 		int context);
746 
747 /**
748  * wlan_cfg_get_tcl_wbm_ring_num_for_index() - Get TCL/WBM ring number for index
749  * @wlan_cfg_ctx: Configuration Handle
750  * @index: index for which TCL/WBM ring numbers are needed
751  * @tcl: pointer to TCL ring number, to be filled
752  * @wbm: pointer to WBM ring number to be filled
753  *
754  * The function fills in tcl/wbm input pointers with TCL/WBM ring numbers for a
755  * given index corresponding to soc->tcl_data_ring or soc->tx_comp_ring. This
756  * is needed since WBM/TCL rings may not be sequentially available for HOST
757  * to use. The function returns values as stored in tcl_wbm_map_array global
758  * array.
759  *
760  * Return: None
761  */
762 static inline
wlan_cfg_get_tcl_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt * wlan_cfg_ctx,int index,int * tcl,int * wbm)763 void wlan_cfg_get_tcl_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
764 					     int index, int *tcl, int *wbm)
765 {
766 	*tcl = wlan_cfg_ctx->tcl_wbm_map_array[index].tcl_ring_num;
767 	*wbm = wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
768 }
769 
770 /**
771  * wlan_cfg_get_wbm_ring_num_for_index() - Get WBM ring number for index
772  * @wlan_cfg_ctx: Configuration Handle
773  * @index: index for which WBM ring numbers is needed
774  *
775  * Return: WBM Ring number for the index
776  */
777 static inline
wlan_cfg_get_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt * wlan_cfg_ctx,int index)778 int wlan_cfg_get_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
779 					int index)
780 {
781 	return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
782 }
783 
784 /**
785  * wlan_cfg_get_rbm_id_for_index() - Get WBM RBM ID for TX ring index
786  * @wlan_cfg_ctx: Configuration Handle
787  * @index: TCL index for which WBM rbm value is needed
788  *
789  * The function fills in wbm rbm value corresponding to a TX ring index in
790  * soc->tcl_data_ring. This is needed since WBM ring numbers donot map
791  * sequentially to wbm rbm values.
792  * The function returns rbm id values as stored in tcl_wbm_map_array global
793  * array.
794  *
795  * Return: WBM rbm value corresnponding to TX ring index
796  */
797 static inline
wlan_cfg_get_rbm_id_for_index(struct wlan_cfg_dp_soc_ctxt * wlan_cfg_ctx,int index)798 int wlan_cfg_get_rbm_id_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, int index)
799 {
800 	return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_rbm_id;
801 }
802 
803 /**
804  * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
805  *				 interrupt context
806  * @wlan_cfg_ctx: Configuration Handle
807  * @context: Numerical ID identifying the Interrupt/NAPI context
808  *
809  * Return: int_rx_ring_mask[context]
810  */
811 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
812 		int context);
813 
814 /**
815  * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
816  *				   mapped to an interrupt context
817  * @wlan_cfg_ctx: Configuration Handle
818  * @context: Numerical ID identifying the Interrupt/NAPI context
819  *
820  * Return: int_rx_mon_ring_mask[context]
821  */
822 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
823 		int context);
824 
825 /**
826  * wlan_cfg_set_tx_mon_ring_mask() - Set Tx monitor ring interrupt mask
827  *				   mapped to an interrupt context
828  * @cfg: Configuration Handle
829  * @context: Numerical ID identifying the Interrupt/NAPI context
830  * @mask: Interrupt mask
831  *
832  * Return: None
833  */
834 void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
835 				   int context, int mask);
836 
837 /**
838  * wlan_cfg_get_tx_mon_ring_mask() - Return Tx monitor ring interrupt mask
839  *				   mapped to an interrupt context
840  * @wlan_cfg_ctx: Configuration Handle
841  * @context: Numerical ID identifying the Interrupt/NAPI context
842  *
843  * Return: int_tx_mon_ring_mask[context]
844  */
845 int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
846 				  int context);
847 
848 /**
849  * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
850  *				   for the given interrupt context
851  * @cfg: Configuration Handle
852  * @context: Numerical ID identifying the Interrupt/NAPI context
853  * @mask: Interrupt mask
854  *
855  */
856 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
857 				       int context, int mask);
858 
859 /**
860  * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
861  *				   mapped to an interrupt context
862  * @cfg: Configuration Handle
863  * @context: Numerical ID identifying the Interrupt/NAPI context
864  *
865  * Return: int_rxdma2host_ring_mask[context]
866  */
867 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
868 				      int context);
869 
870 /**
871  * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
872  *				   for the given interrupt context
873  * @cfg: Configuration Handle
874  * @context: Numerical ID identifying the Interrupt/NAPI context
875  * @mask: Interrupt mask
876  *
877  */
878 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
879 				       int context, int mask);
880 
881 /**
882  * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
883  *				   mapped to an interrupt context
884  * @cfg: Configuration Handle
885  * @context: Numerical ID identifying the Interrupt/NAPI context
886  *
887  * Return: int_host2rxdma_ring_mask[context]
888  */
889 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
890 				      int context);
891 
892 /**
893  * wlan_cfg_get_rx_near_full_grp_1_mask() - Return REO near full interrupt mask
894  *					mapped to an interrupt context
895  * @cfg: Configuration Handle
896  * @context: Numerical ID identifying the Interrupt/NAPI context
897  *
898  * Return: REO near full interrupt mask[context]
899  */
900 int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
901 					 int context);
902 
903 /**
904  * wlan_cfg_get_rx_near_full_grp_2_mask() - Return REO near full interrupt mask
905  *					mapped to an interrupt context
906  * @cfg: Configuration Handle
907  * @context: Numerical ID identifying the Interrupt/NAPI context
908  *
909  * Return: REO near full interrupt mask[context]
910  */
911 int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
912 					 int context);
913 
914 /**
915  * wlan_cfg_get_tx_ring_near_full_mask() - Return tx completion ring near full
916  *				interrupt mask mapped to an interrupt context
917  * @cfg: Configuration Handle
918  * @context: Numerical ID identifying the Interrupt/NAPI context
919  *
920  * Return: tx completion near full interrupt mask[context]
921  */
922 int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
923 					int context);
924 /**
925  * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
926  *                                interrupt mask for the given interrupt context
927  * @cfg: Configuration Handle
928  * @context: Numerical ID identifying the Interrupt/NAPI context
929  * @mask: Interrupt mask
930  *
931  */
932 void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
933 					   int context, int mask);
934 
935 /**
936  * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
937  *                               interrupt mask mapped to an interrupt context
938  * @cfg: Configuration Handle
939  * @context: Numerical ID identifying the Interrupt/NAPI context
940  *
941  * Return: int_host2rxdma_mon_ring_mask[context]
942  */
943 int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
944 					  int context);
945 
946 /**
947  * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
948  *				   destination ring interrupt mask
949  *				   for the given interrupt context
950  * @cfg: Configuration Handle
951  * @context: Numerical ID identifying the Interrupt/NAPI context
952  * @mask: Interrupt mask
953  *
954  */
955 void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
956 					   int context, int mask);
957 
958 /**
959  * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
960  *				   destination ring interrupt mask
961  *				   mapped to an interrupt context
962  * @cfg: Configuration Handle
963  * @context: Numerical ID identifying the Interrupt/NAPI context
964  *
965  * Return: int_rxdma2host_mon_ring_mask[context]
966  */
967 int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
968 					  int context);
969 
970 /**
971  * wlan_cfg_set_hw_mac_idx() - Set HW MAC Idx for the given PDEV index
972  *
973  * @cfg: Configuration Handle
974  * @pdev_idx: Index of SW PDEV
975  * @hw_macid: HW MAC Id
976  *
977  */
978 void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg,
979 			     int pdev_idx, int hw_macid);
980 
981 /**
982  * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
983  * PDEV index
984  *
985  * @cfg: Configuration Handle
986  * @pdev_idx: Index of SW PDEV
987  *
988  * Return: HW MAC index
989  */
990 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
991 
992 /**
993  * wlan_cfg_get_target_pdev_id() - Get target PDEV ID for HW MAC ID
994  *
995  * @cfg: Configuration Handle
996  * @hw_macid: Index of hw mac
997  *
998  * Return: PDEV ID
999  */
1000 int
1001 wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
1002 
1003 /**
1004  * wlan_cfg_set_pdev_idx() - Set 0 based host PDEV index for the given
1005  * hw mac index
1006  *
1007  * @cfg: Configuration Handle
1008  * @pdev_idx: Index of SW PDEV
1009  * @hw_macid: Index of hw mac
1010  *
1011  * Return: PDEV index
1012  */
1013 void wlan_cfg_set_pdev_idx
1014 	(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
1015 
1016 /**
1017  * wlan_cfg_get_pdev_idx() - Get 0 based PDEV index for the given
1018  * hw mac index
1019  *
1020  * @cfg: Configuration Handle
1021  * @hw_macid: Index of hw mac
1022  *
1023  * Return: PDEV index
1024  */
1025 int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
1026 
1027 /**
1028  * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
1029  *					   mapped to an interrupt context
1030  * @cfg: Configuration Handle
1031  * @context: Numerical ID identifying the Interrupt/NAPI context
1032  *
1033  * Return: int_rx_err_ring_mask[context]
1034  */
1035 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
1036 				  context);
1037 
1038 /**
1039  * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
1040  *					   mapped to an interrupt context
1041  * @cfg: Configuration Handle
1042  * @context: Numerical ID identifying the Interrupt/NAPI context
1043  *
1044  * Return: int_wbm_rel_ring_mask[context]
1045  */
1046 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
1047 				      context);
1048 
1049 /**
1050  * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
1051  *					   mapped to an interrupt context
1052  * @cfg: Configuration Handle
1053  * @context: Numerical ID identifying the Interrupt/NAPI context
1054  *
1055  * Return: int_reo_status_ring_mask[context]
1056  */
1057 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
1058 				      context);
1059 
1060 /**
1061  * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
1062  *				mapped to an interrupt context
1063  * @wlan_cfg_ctx: Configuration Handle
1064  * @context: Numerical ID identifying the Interrupt/NAPI context
1065  *
1066  * Return: int_ce_ring_mask[context]
1067  */
1068 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
1069 		int context);
1070 
1071 /**
1072  * wlan_cfg_get_umac_reset_intr_mask() - Get UMAC reset interrupt mask
1073  * mapped to an interrupt context
1074  * @cfg: Configuration Handle
1075  * @context: Numerical ID identifying the Interrupt/NAPI context
1076  *
1077  * Return: int_umac_reset_intr_mask[context]
1078  */
1079 int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
1080 				      int context);
1081 /**
1082  * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
1083  *				supported by device
1084  * @wlan_cfg_ctx: Configuration Handle
1085  *
1086  * Return: max_clients
1087  */
1088 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1089 
1090 /**
1091  * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
1092  *			    memory allocation request for this device
1093  * @wlan_cfg_ctx: Configuration Handle
1094  *
1095  * Return: max_alloc_size
1096  */
1097 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1098 
1099 /**
1100  * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
1101  *			       one per radio
1102  * @wlan_cfg_ctx: Configuration Handle
1103  *
1104  * Return: per_pdev_tx_ring
1105  */
1106 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1107 
1108 /**
1109  * wlan_cfg_num_tx_comp_rings() - Number of Tx comp rings (HOST mode)
1110  * @wlan_cfg_ctx: Configuration Handle
1111  *
1112  * Return: num_tx_comp_rings
1113  */
1114 int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1115 
1116 /**
1117  * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings (HOST mode)
1118  * @wlan_cfg_ctx: Configuration Handle
1119  *
1120  * Return: num_tcl_data_rings
1121  */
1122 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1123 
1124 /**
1125  * wlan_cfg_num_nss_tcl_data_rings() - Number of TCL Data rings (NSS offload)
1126  * @wlan_cfg_ctx: Configuration Handle
1127  *
1128  * Return: num_tcl_data_rings
1129  */
1130 int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1131 
1132 /**
1133  * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
1134  *                              one per radio
1135  * @wlan_cfg_ctx: Configuration Handle
1136  *
1137  * Return: per_pdev_rx_ring
1138  */
1139 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1140 
1141 /**
1142  * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
1143  *                              one per radio
1144  * @wlan_cfg_ctx: Configuration Handle
1145  *
1146  * Return: return 1 if per pdev error ring else 0
1147  */
1148 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1149 
1150 /**
1151  * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings (HOST mode)
1152  * @wlan_cfg_ctx: Configuration Handle
1153  *
1154  * Return: num_reo_dest_rings
1155  */
1156 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1157 
1158 /**
1159  * wlan_cfg_num_nss_reo_dest_rings() - Number of REO Data rings (NSS offload)
1160  * @wlan_cfg_ctx: Configuration Handle
1161  *
1162  * Return: num_reo_dest_rings
1163  */
1164 int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1165 
1166 /**
1167  * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
1168  * @wlan_cfg_ctx: Configuration Handle
1169  *
1170  * Return: htt_pkt_type_ethernet
1171  */
1172 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1173 
1174 /**
1175  * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
1176  *					device
1177  * @wlan_cfg_ctx: Configuration Handle
1178  *
1179  * Return: num_tx_desc_pool
1180  */
1181 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1182 
1183 /**
1184  * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
1185  *					device
1186  * @cfg: Configuration Handle
1187  * @num_pool: Number of pool
1188  */
1189 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
1190 
1191 /**
1192  * wlan_cfg_get_num_tx_ext_desc_pool() -  Number of Tx MSDU ext Descriptor
1193  *					pools
1194  * @wlan_cfg_ctx: Configuration Handle
1195  *
1196  * Return: num_tx_ext_desc_pool
1197  */
1198 int wlan_cfg_get_num_tx_ext_desc_pool(
1199 		struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1200 
1201 /**
1202  * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
1203  *
1204  * @cfg: Configuration Handle
1205  *
1206  * Return: reo_dst_ring_size
1207  */
1208 int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1209 
1210 /**
1211  * wlan_cfg_set_reo_dst_ring_size() - Set the REO Destination ring size
1212  *
1213  * @cfg: Configuration Handle
1214  * @reo_dst_ring_size: REO Destination ring size
1215  */
1216 void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1217 				    int reo_dst_ring_size);
1218 
1219 /**
1220  * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
1221  *
1222  * @cfg: Configuration Handle
1223  * @raw_mode_war: raw mode war configuration
1224  */
1225 void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
1226 			       bool raw_mode_war);
1227 
1228 /**
1229  * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
1230  *
1231  * @cfg: Configuration Handle
1232  *
1233  * Return: reo_dst_ring_size
1234  */
1235 bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
1236 
1237 /**
1238  * wlan_cfg_set_num_tx_ext_desc_pool() -  Set the number of Tx MSDU ext Descriptor
1239  *					pools
1240  * @cfg: Configuration Handle
1241  * @num_pool: Number of pool
1242  */
1243 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
1244 
1245 /**
1246  * wlan_cfg_get_num_global_tx_desc() - Number of global Tx Descriptors allowed
1247  * @wlan_cfg_ctx: Configuration Handle
1248  *
1249  * Return: num_global_tx_desc
1250  */
1251 int wlan_cfg_get_num_global_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1252 
1253 /**
1254  * wlan_cfg_get_num_global_spcl_tx_desc() - Number of global special Tx Descriptors
1255  * allowed
1256  * @wlan_cfg_ctx: Configuration Handle
1257  *
1258  * Return: num_global_spcl_tx_desc
1259  */
1260 int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1261 
1262 /**
1263  * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
1264  * @wlan_cfg_ctx: Configuration Handle
1265  *
1266  * Return: num_tx_desc
1267  */
1268 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1269 
1270 /**
1271  * wlan_cfg_set_num_tx_spl_desc() - Set the number of special Tx Descriptors
1272  * per pool
1273  *
1274  * @cfg: Configuration Handle
1275  * @num_desc: Number of descriptor
1276  */
1277 void wlan_cfg_set_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg,
1278 				  int num_desc);
1279 
1280 /**
1281  * wlan_cfg_get_num_tx_spl_desc() - Number of Tx Descriptors for special
1282  *				    frames per pool
1283  * @wlan_cfg_ctx: Configuration Handle
1284  *
1285  * Return: num_tx_desc
1286  */
1287 int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1288 
1289 /**
1290  * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
1291  * @wlan_cfg_ctx: Configuration Handle
1292  *
1293  * Return: num_tx_desc
1294  */
1295 int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1296 
1297 /**
1298  * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
1299  *
1300  * @cfg: Configuration Handle
1301  * @num_desc: Number of descriptor
1302  */
1303 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
1304 
1305 /**
1306  * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
1307  *					per pool
1308  * @wlan_cfg_ctx: Configuration Handle
1309  *
1310  * Return: num_tx_ext_desc
1311  */
1312 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
1313 
1314 /**
1315  * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension
1316  *                                  Descriptors per pool
1317  * @cfg: Configuration Handle
1318  * @num_ext_desc: Number of descriptor
1319  */
1320 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg,
1321 				  int num_ext_desc);
1322 
1323 /**
1324  * wlan_cfg_max_peer_id() - Get maximum peer ID
1325  * @cfg: Configuration Handle
1326  *
1327  * Return: maximum peer ID
1328  */
1329 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
1330 
1331 /**
1332  * wlan_cfg_get_dma_mon_buf_ring_size(): Return Size of monitor buffer ring
1333  * @wlan_cfg_pdev_ctx: pdev configuration context
1334  *
1335  * Return: dma_mon_buf_ring_size
1336  */
1337 int wlan_cfg_get_dma_mon_buf_ring_size(
1338 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1339 
1340 /**
1341  * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
1342  * @wlan_cfg_pdev_ctx: pdev configuration context
1343  *
1344  * Return: dma_mon_stat_ring_size
1345  */
1346 int wlan_cfg_get_dma_mon_stat_ring_size(
1347 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1348 
1349 /**
1350  * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
1351  * @cfg: soc configuration context
1352  *
1353  * Return: rxdma monitor desc ring size
1354  */
1355 int
1356 wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
1357 
1358 /**
1359  * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
1360  * @wlan_cfg_pdev_ctx: pdev configuration context
1361  *
1362  * Return: rx_dma_buf_ring_size
1363  */
1364 int wlan_cfg_get_rx_dma_buf_ring_size(
1365 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
1366 
1367 /**
1368  * wlan_cfg_set_rx_dma_buf_ring_size() - Set RxDMA buffer ring size
1369  * @cfg: pdev configuration context
1370  * @ring_size: rxdma buffer ring size to be set
1371  *
1372  * Return: None
1373  */
1374 void
1375 wlan_cfg_set_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg,
1376 				  int ring_size);
1377 
1378 /**
1379  * wlan_cfg_rx_pending_hl_threshold() - Return high threshold of rx pending
1380  * @cfg: pdev configuration context
1381  *
1382  * Return: rx_pending_high_threshold
1383  */
1384 uint32_t
1385 wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
1386 
1387 /**
1388  * wlan_cfg_rx_pending_lo_threshold() - Return low threshold of rx pending
1389  * @cfg: soc configuration context
1390  *
1391  * Return: rx_pending_low_threshold
1392  */
1393 uint32_t
1394 wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
1395 
1396 /**
1397  * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
1398  * per pdev
1399  * @cfg: pdev configuration context
1400  *
1401  * Return: number of mac DMA rings per pdev
1402  */
1403 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
1404 
1405 /**
1406  * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
1407  * @cfg: soc configuration context
1408  *
1409  * Return: true - LRO enabled false - LRO disabled
1410  */
1411 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1412 
1413 /**
1414  * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
1415  * @cfg: soc configuration context
1416  *
1417  * Return: true - GRO enabled false - GRO disabled
1418  */
1419 bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1420 
1421 /**
1422  * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
1423  * @cfg: soc configuration context
1424  *
1425  * Return: true - enabled false - disabled
1426  */
1427 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1428 
1429 /**
1430  * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
1431  * @cfg: soc configuration context
1432  *
1433  * Return: true - enabled false - disabled
1434  */
1435 bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1436 
1437 /**
1438  * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
1439  * @cfg: soc configuration context
1440  * @rx_hash: true - enabled false - disabled
1441  */
1442 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
1443 
1444 /**
1445  * wlan_cfg_is_rx_rr_enabled - Return RX round robin enabled/disabled
1446  * @cfg: soc configuration context
1447  *
1448  * Return: true - enabled false - disabled
1449  */
1450 bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1451 
1452 /**
1453  * wlan_cfg_set_rx_rr - set rx round robin enabled/disabled
1454  * @cfg: soc configuration context
1455  * @rx_rr: true - enabled false - disabled
1456  */
1457 void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_rr);
1458 
1459 /**
1460  * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
1461  * @cfg: pdev configuration context
1462  *
1463  * Return: 1 - enabled 0 - disabled
1464  */
1465 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
1466 
1467 /**
1468  * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
1469  * @cfg: pdev configuration context
1470  * @nss_enabled: 1 - enabled 0 - disabled
1471  */
1472 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg,
1473 				      int nss_enabled);
1474 
1475 /**
1476  * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
1477  * @cfg: soc configuration context
1478  *
1479  * Return: nss_cfg
1480  */
1481 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
1482 
1483 /**
1484  * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
1485  * @cfg: soc configuration context
1486  * @nss_cfg: NSS configuration
1487  *
1488  */
1489 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
1490 
1491 /**
1492  * wlan_cfg_get_int_timer_threshold_ppe2tcl - Get intr mitigation for ppe2tcl
1493  * @cfg: soc configuration context
1494  *
1495  * Return: Timer threshold
1496  */
1497 int wlan_cfg_get_int_timer_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg);
1498 
1499 /**
1500  * wlan_cfg_get_int_batch_threshold_ppe2tcl - Get intr mitigation for ppe2tcl
1501  * @cfg: soc configuration context
1502  *
1503  * Return: Batch threshold
1504  */
1505 int wlan_cfg_get_int_batch_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg);
1506 
1507 /**
1508  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
1509  * @cfg: soc configuration context
1510  *
1511  * Return: Batch threshold
1512  */
1513 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
1514 
1515 /**
1516  * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
1517  * @cfg: soc configuration context
1518  *
1519  * Return: Timer threshold
1520  */
1521 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
1522 
1523 /**
1524  * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
1525  * @cfg: soc configuration context
1526  *
1527  * Return: Batch threshold
1528  */
1529 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
1530 
1531 /**
1532  * wlan_cfg_get_int_timer_threshold_rx - Get interrupt mitigation cfg for Rx
1533  * @cfg: soc configuration context
1534  *
1535  * Return: Timer threshold
1536  */
1537 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
1538 
1539 /**
1540  * wlan_cfg_get_int_batch_threshold_other - Get interrupt mitigation cfg for
1541  *                                          other srngs
1542  * @cfg: soc configuration context
1543  *
1544  * Return: Batch threshold
1545  */
1546 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
1547 
1548 /**
1549  * wlan_cfg_get_int_timer_threshold_other - Get interrupt mitigation cfg for
1550  *                                          other srngs
1551  * @cfg: soc configuration context
1552  *
1553  * Return: Timer threshold
1554  */
1555 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
1556 
1557 /**
1558  * wlan_cfg_get_int_batch_threshold_mon_dest - Get interrupt mitigation cfg for
1559  * monitor destination srng
1560  * @cfg: soc configuration context
1561  *
1562  * Return: Batch threshold
1563  */
1564 int wlan_cfg_get_int_batch_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg);
1565 
1566 /**
1567  * wlan_cfg_get_int_timer_threshold_mon_dest - Get interrupt mitigation cfg for
1568  * monitor destination srngs
1569  * @cfg: soc configuration context
1570  *
1571  * Return: Timer threshold
1572  */
1573 int wlan_cfg_get_int_timer_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg);
1574 
1575 /**
1576  * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
1577  * @cfg: soc configuration context
1578  *
1579  * Return: Checksum offload enable or disable
1580  */
1581 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1582 
1583 /**
1584  * wlan_cfg_get_nan_checksum_offload - Get checksum offload enable/disable val
1585  * @cfg: soc configuration context
1586  *
1587  * Return: Checksum offload enable or disable value for NAN mode
1588  */
1589 int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1590 
1591 /**
1592  * wlan_cfg_get_p2p_checksum_offload - Get checksum offload enable/disable val
1593  * @cfg: soc configuration context
1594  *
1595  * Return: Checksum offload enable or disable value for P2P mode
1596  */
1597 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
1598 
1599 /**
1600  * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
1601  * @cfg: soc configuration context
1602  *
1603  * Return: Tx Ring Size
1604  */
1605 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1606 
1607 /**
1608  * wlan_cfg_set_tx_ring_size - Set Tx ring size
1609  * @cfg: soc configuration context
1610  * @ring_size: TX ring size to be set
1611  *
1612  * Return: None
1613  */
1614 void wlan_cfg_set_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1615 			       int ring_size);
1616 
1617 /**
1618  * wlan_cfg_time_control_bp - Get time for interval in bp prints
1619  * @cfg: soc configuration context
1620  *
1621  * Return: interval time
1622  */
1623 int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg);
1624 
1625 /**
1626  * wlan_cfg_rx_buffer_size - Get buffer size for skb
1627  * @cfg: soc configuration context
1628  *
1629  * Return: buffer size
1630  */
1631 int wlan_cfg_rx_buffer_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1632 
1633 /**
1634  * wlan_cfg_qref_control_size - Get debug array size
1635  * @cfg: soc configuration context
1636  *
1637  * Return: array size
1638  */
1639 int wlan_cfg_qref_control_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1640 
1641 /**
1642  * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
1643  * @cfg: soc configuration context
1644  *
1645  * Return: Tx Completion ring size
1646  */
1647 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1648 
1649 /**
1650  * wlan_cfg_set_tx_comp_ring_size - Set Tx completion ring size
1651  * @cfg: soc configuration context
1652  * @ring_size: TX completion ring size to be set
1653  *
1654  * Return: None
1655  */
1656 void wlan_cfg_set_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1657 				    int ring_size);
1658 
1659 /**
1660  * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
1661  * @cfg: soc configuration context
1662  *
1663  * Return: wbm_release_ring size
1664  */
1665 int
1666 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1667 
1668 /**
1669  * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
1670  * @cfg: soc configuration context
1671  *
1672  * Return: tcl_cmd_credit_ring size
1673  */
1674 int
1675 wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1676 
1677 /**
1678  * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
1679  * @cfg: soc configuration context
1680  *
1681  * Return: tcl_status_ring size
1682  */
1683 int
1684 wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1685 
1686 /**
1687  * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
1688  * @cfg: soc configuration context
1689  *
1690  * Return: reo_reinject_ring size
1691  */
1692 int
1693 wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1694 
1695 /**
1696  * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
1697  * @cfg: soc configuration context
1698  *
1699  * Return: rx_release_ring size
1700  */
1701 int
1702 wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1703 
1704 /**
1705  * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
1706  * @cfg: soc configuration context
1707  *
1708  * Return: reo_exception_ring size
1709  */
1710 int
1711 wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1712 
1713 /**
1714  * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
1715  * @cfg: soc configuration context
1716  *
1717  * Return: reo_cmd_ring size
1718  */
1719 int
1720 wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1721 
1722 /**
1723  * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
1724  * @cfg: soc configuration context
1725  *
1726  * Return: reo_status_ring size
1727  */
1728 int
1729 wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1730 
1731 /**
1732  * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
1733  * @cfg: soc configuration context
1734  *
1735  * Return: tx desc limit for 5G H
1736  */
1737 int
1738 wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
1739 
1740 /**
1741  * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
1742  * @cfg: soc configuration context
1743  *
1744  * Return: tx desc limit for 2G
1745  */
1746 int
1747 wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
1748 
1749 /**
1750  * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
1751  * @cfg: soc configuration context
1752  *
1753  * Return: tx desc limit for 5G L
1754  */
1755 int
1756 wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
1757 
1758 /**
1759  * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
1760  * @cfg: soc configuration context
1761  *
1762  * Return: tx device limit
1763  */
1764 int
1765 wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
1766 
1767 /**
1768  * wlan_cfg_get_dp_soc_tx_spl_device_limit - Get tx device limit for special
1769  *					     frames
1770  * @cfg: Configuration Handle
1771  *
1772  * Return: tx device limit for special frames
1773  */
1774 int
1775 wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
1776 
1777 /**
1778  * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
1779  * @cfg: soc configuration context
1780  *
1781  * Return: tx sw internode queue
1782  */
1783 int
1784 wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
1785 
1786 /**
1787  * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
1788  * @cfg: soc configuration context
1789  *
1790  * Return: rxdma refill ring size
1791  */
1792 int
1793 wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1794 
1795 /**
1796  * wlan_cfg_set_dp_soc_rxdma_refill_ring_size - Set rxdma refill ring size
1797  * @cfg: soc configuration context
1798  * @ring_size: rxdma refill ring size to be set
1799  *
1800  * Return: None
1801  */
1802 void
1803 wlan_cfg_set_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1804 					   int ring_size);
1805 
1806 /**
1807  * wlan_cfg_get_dp_soc_rxdma_refill_lt_disable - Get RxDMA refill LT status
1808  * @cfg: soc configuration context
1809  *
1810  * Return: true if Low threshold disable else false
1811  */
1812 bool
1813 wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg);
1814 
1815 /**
1816  * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
1817  * @cfg: soc configuration context
1818  *
1819  * Return: rxdma error dst ring size
1820  */
1821 int
1822 wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1823 
1824 /**
1825  * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight
1826  * @cfg: soc configuration context
1827  *
1828  * Return: rx_sw_desc_weight
1829  */
1830 int
1831 wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
1832 
1833 /**
1834  * wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
1835  * @cfg: soc configuration context
1836  *
1837  * Return: rx_sw_desc_num
1838  */
1839 int
1840 wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
1841 
1842 /**
1843  * wlan_cfg_set_dp_soc_rx_sw_desc_num - Set rx sw desc num
1844  * @cfg: soc configuration context
1845  * @desc_num: Number of Rx descriptors to be set
1846  *
1847  * Return: None
1848  */
1849 void
1850 wlan_cfg_set_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg,
1851 				   int desc_num);
1852 
1853 /**
1854  * wlan_cfg_get_dp_caps - Get dp capabilities
1855  * @cfg: soc configuration context
1856  * @dp_caps: enum for dp capabilities
1857  *
1858  * Return: bool if a dp capabilities is enabled
1859  */
1860 bool
1861 wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
1862 		     enum cdp_capabilities dp_caps);
1863 
1864 /**
1865  * wlan_set_srng_cfg() - Fill per ring specific
1866  * configuration parameters
1867  * @wlan_cfg: global srng configuration table
1868  *
1869  * Return: None
1870  */
1871 void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
1872 
1873 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
1874 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
1875 
1876 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
1877 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
1878 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
1879 
1880 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
1881 
1882 /**
1883  * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST
1884  *                                            in number of entries
1885  *
1886  * @cfg: soc configuration context
1887  *
1888  * Return: rx_fst_size
1889  */
1890 uint16_t
1891 wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg);
1892 
1893 /**
1894  * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search
1895  *
1896  * @cfg: soc configuration context
1897  *
1898  * Return: max_search
1899  */
1900 uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg);
1901 
1902 /**
1903  * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST
1904  *                                  search
1905  *
1906  * @cfg: soc configuration context
1907  *
1908  * Return: 320-bit Hash Key
1909  */
1910 uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg);
1911 
1912 /**
1913  * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in
1914  *                                      DP soc context
1915  * @cfg: soc configuration context
1916  * @val: Rx flow tag feature flag value
1917  *
1918  * Return: None
1919  */
1920 void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
1921 				      bool val);
1922 
1923 /**
1924  * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from
1925  *                                     DP soc context
1926  * @cfg: soc configuration context
1927  *
1928  * Return: true if feature is enabled, else false
1929  */
1930 bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1931 
1932 /**
1933  * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that
1934  *                                                Rx FST is per pdev
1935  * @cfg: soc configuration context
1936  * @val: boolean flag indicating Rx FST per pdev or per SOC
1937  *
1938  * Return: None
1939  */
1940 void
1941 wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
1942 					   bool val);
1943 
1944 /**
1945  * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev
1946  * @cfg: soc configuration context
1947  *
1948  * Return: true if Rx FST is per pdev, else false
1949  */
1950 bool
1951 wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg);
1952 
1953 /**
1954  * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context
1955  * @cfg: soc configuration context
1956  * @val: Rx FST size in number of entries
1957  *
1958  * Return: None
1959  */
1960 void
1961 wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
1962 				       uint16_t val);
1963 
1964 /**
1965  * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag
1966  *                                                   in DP soc context
1967  * @cfg: soc configuration context
1968  * @val: Rx protocol or flow tag feature flag value in monitor mode from INI
1969  *
1970  * Return: None
1971  */
1972 void
1973 wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
1974 					      bool val);
1975 
1976 /**
1977  * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag
1978  *                                                  from DP soc context
1979  * @cfg: soc configuration context
1980  *
1981  * Return: true if feature is enabled in monitor mode for protocol or flow
1982  * tagging in INI, false otherwise
1983  */
1984 bool
1985 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
1986 
1987 /**
1988  * wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
1989  *                                              vdev id check in tx.
1990  * @cfg: soc configuration context
1991  * @val: feature flag value
1992  *
1993  * Return: None
1994  */
1995 void
1996 wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
1997 				      bool val);
1998 
1999 /**
2000  * wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
2001  *                              perpkt vdev id check is enabled in tx.
2002  * @cfg: soc configuration context
2003  *
2004  * Return: true if feature is enabled, false otherwise
2005  */
2006 bool
2007 wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2008 
2009 /**
2010  * wlan_cfg_fill_interrupt_mask() - set interrupt mask
2011  *
2012  * @wlan_cfg_ctx: soc configuration context
2013  * @num_dp_msi: Number of DP interrupts available (0 for integrated)
2014  * @interrupt_mode: Type of interrupt
2015  * @is_monitor_mode: is monitor mode enabled
2016  * @ppeds_attached: is ppeds attached
2017  * @umac_reset_support: Umac reset support
2018  *
2019  * Return: void
2020  */
2021 void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
2022 				  int num_dp_msi, int interrupt_mode,
2023 				  bool is_monitor_mode, bool ppeds_attached,
2024 				  bool umac_reset_support);
2025 
2026 /**
2027  * wlan_cfg_is_rx_buffer_pool_enabled() - Get RX buffer pool enabled flag
2028  *
2029  *
2030  * @cfg: soc configuration context
2031  *
2032  * Return: true if enabled, false otherwise.
2033  */
2034 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2035 
2036 /**
2037  * wlan_cfg_is_rx_refill_buffer_pool_enabled() - Get RX refill buffer pool enabled flag
2038  *
2039  *
2040  * @cfg: soc configuration context
2041  *
2042  * Return: true if enabled, false otherwise.
2043  */
2044 bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2045 
2046 /**
2047  * wlan_cfg_is_dp_buf_page_frag_alloc_enable() - Get nbuf allocations from page
2048  *						 frags.
2049  *
2050  * @cfg: soc configuration context
2051  *
2052  * Return: true if enabled, false otherwise.
2053  */
2054 
2055 bool
2056 wlan_cfg_is_dp_buf_page_frag_alloc_enable(struct wlan_cfg_dp_soc_ctxt *cfg);
2057 
2058 #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
2059 /**
2060  * wlan_cfg_get_rx_refill_buf_pool_size() - Get Rx refill buf pool size
2061  *
2062  * @cfg: soc configuration context
2063  *
2064  * Return: Rx refill buffer pool size
2065  */
2066 int wlan_cfg_get_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2067 
2068 /**
2069  * wlan_cfg_set_rx_refill_buf_pool_size() - Set Rx refill buf pool size
2070  *
2071  * @cfg: soc configuration context
2072  * @size: size of the Rx buffer pool size
2073  *
2074  * Return: None
2075  */
2076 void
2077 wlan_cfg_set_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg,
2078 				     int size);
2079 #endif
2080 
2081 void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
2082 					bool val);
2083 
2084 bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
2085 
2086 /**
2087  * wlan_cfg_get_reo_rings_mapping() - Get Reo destination ring bitmap
2088  *
2089  *
2090  * @cfg: soc configuration context
2091  *
2092  * Return: reo ring bitmap.
2093  */
2094 uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
2095 
2096 /**
2097  * wlan_cfg_get_rx_rings_mapping() - Get RX ring bitmap
2098  *
2099  * @cfg: soc configuration context
2100  *
2101  * Return: rx ring bitmap.
2102  */
2103 uint32_t wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
2104 
2105 /**
2106  * wlan_cfg_set_peer_ext_stats() - set peer extended stats
2107  *
2108  * @cfg: soc configuration context
2109  * @val: Flag value read from INI
2110  *
2111  * Return: void
2112  */
2113 void
2114 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
2115 			    bool val);
2116 
2117 /**
2118  * wlan_cfg_set_peer_jitter_stats() - set peer jitter stats
2119  *
2120  * @cfg: soc configuration context
2121  * @val: Flag value read from INI
2122  *
2123  * Return: bool
2124  */
2125 void
2126 wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
2127 			       bool val);
2128 
2129 /**
2130  * wlan_cfg_is_peer_ext_stats_enabled() - Check if peer extended
2131  *                                        stats are enabled
2132  *
2133  * @cfg: soc configuration context
2134  *
2135  * Return: bool
2136  */
2137 bool
2138 wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2139 
2140 /**
2141  * wlan_cfg_is_peer_jitter_stats_enabled() - check if jitter stats are enabled
2142  *
2143  * @cfg: soc configuration context
2144  *
2145  * Return: bool
2146  */
2147 bool
2148 wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2149 
2150 /**
2151  * wlan_cfg_is_poll_mode_enabled() - Check if poll mode is enabled
2152  *
2153  * @cfg: soc configuration context
2154  *
2155  * Return: bool
2156  */
2157 
2158 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2159 
2160 /**
2161  * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
2162  * @cfg: soc configuration context
2163  *
2164  * Return: true if enabled, false otherwise.
2165  */
2166 bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2167 
2168 /**
2169  * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
2170  * @cfg: soc configuration context
2171  *
2172  * Return: true if enabled, false otherwise.
2173  */
2174 bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2175 
2176 /**
2177  * wlan_cfg_set_peer_link_stats() - set peer link stats
2178  *
2179  * @cfg: soc configuration context
2180  * @val: Flag value read from INI
2181  *
2182  * Return: void
2183  */
2184 void
2185 wlan_cfg_set_peer_link_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
2186 			     bool val);
2187 /**
2188  * wlan_cfg_is_peer_link_stats_enabled() - check if link peer stats are enabled
2189  *
2190  * @cfg: soc configuration context
2191  *
2192  * Return: bool
2193  */
2194 bool
2195 wlan_cfg_is_peer_link_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
2196 
2197 #ifdef IPA_OFFLOAD
2198 /**
2199  * wlan_cfg_ipa_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
2200  * @cfg: dp cfg context
2201  *
2202  * Return: IPA Tx Ring Size
2203  */
2204 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2205 
2206 /**
2207  * wlan_cfg_ipa_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
2208  * @cfg: dp cfg context
2209  *
2210  * Return: IPA Tx Completion ring size
2211  */
2212 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2213 
2214 /**
2215  * wlan_cfg_ipa_tx_alt_ring_size - Get Tx alt DMA ring size (TCL Data Ring)
2216  * @cfg: dp cfg context
2217  *
2218  * Return: IPA Tx alt Ring Size
2219  */
2220 int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2221 
2222 /**
2223  * wlan_cfg_ipa_tx_alt_comp_ring_size - Get Tx alt comp DMA ring size
2224  *  (TCL Data Ring)
2225  * @cfg: dp cfg context
2226  *
2227  * Return: IPA Tx alt comp Ring Size
2228  */
2229 int
2230 wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2231 
2232 #else
2233 static inline
wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt * cfg)2234 uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
2235 {
2236 	return 0;
2237 }
2238 
2239 static inline
wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt * cfg)2240 uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
2241 {
2242 	return 0;
2243 }
2244 #endif
2245 
2246 /**
2247  * wlan_cfg_radio0_default_reo_get -  Get Radio0 default REO
2248  * @cfg: soc configuration context
2249  *
2250  * Return: None
2251  */
2252 uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
2253 
2254 /**
2255  * wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
2256  * @cfg: soc configuration context
2257  *
2258  * Return: None
2259  */
2260 uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
2261 
2262 /**
2263  * wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
2264  * @cfg: soc configuration context
2265  *
2266  * Return: None
2267  */
2268 uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
2269 
2270 /**
2271  * wlan_cfg_set_rxdma1_enable() - Enable rxdma1
2272  * @wlan_cfg_ctx: soc configuration context
2273  *
2274  * Return: None
2275  */
2276 void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
2277 
2278 /**
2279  * wlan_cfg_is_delay_mon_replenish() - Get if delayed monitor replenish
2280  * is enabled
2281  * @cfg: soc configuration context
2282  *
2283  * Return: true if enabled, false otherwise.
2284  */
2285 bool
2286 wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg);
2287 
2288 /**
2289  * wlan_cfg_set_delay_mon_replenish() - Set delayed monitor replenish
2290  * @cfg: soc configuration context
2291  * @val: val to set
2292  *
2293  * Return: None
2294  */
2295 void
2296 wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
2297 
2298 /**
2299  * wlan_cfg_dp_soc_ctx_dump() - Dump few DP cfg soc parameters
2300  * @cfg: soc configuration context
2301  *
2302  * Return:
2303  */
2304 void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
2305 
2306 #ifdef WLAN_SUPPORT_PPEDS
2307 /**
2308  * wlan_cfg_get_dp_soc_ppeds_enable() - API to get ppe enable flag
2309  * @cfg: Configuration Handle
2310  *
2311  * Return: true if ppeds support is enabled else return false
2312  */
2313 bool
2314 wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg);
2315 
2316 /**
2317  * wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
2318  * @cfg: Configuration Handle
2319  *
2320  * Return: size of reo2ppe ring
2321  */
2322 int
2323 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2324 
2325 /**
2326  * wlan_cfg_get_dp_soc_ppe2tcl_ring_size() - get ppe tx ring size
2327  * @cfg: Configuration Handle
2328  *
2329  * Return: size of ppe2tcl ring
2330  */
2331 int
2332 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2333 
2334 /**
2335  * wlan_cfg_get_dp_soc_ppeds_num_tx_desc() - Number of ppeds tx Descriptors
2336  * @cfg: Configuration Handle
2337  *
2338  * Return: num_tx_desc
2339  */
2340 int
2341 wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg);
2342 
2343 /**
2344  * wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len() - Max hotlist len of tx descs
2345  * @cfg: Configuration Handle
2346  *
2347  * Return: hotlist len
2348  */
2349 int
2350 wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg);
2351 /**
2352  * wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget() - ppeds Tx comp napi budget
2353  * @cfg: Configuration Handle
2354  *
2355  * Return: napi budget
2356  */
2357 int
2358 wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg);
2359 #else
2360 static inline bool
wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt * cfg)2361 wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
2362 {
2363 	return false;
2364 }
2365 
2366 static inline int
wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt * cfg)2367 wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
2368 {
2369 	return 0;
2370 }
2371 
2372 static inline int
wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt * cfg)2373 wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
2374 {
2375 	return 0;
2376 }
2377 
2378 static inline int
wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt * cfg)2379 wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
2380 {
2381 	return 0;
2382 }
2383 
2384 static inline int
wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt * cfg)2385 wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
2386 {
2387 	return 0;
2388 }
2389 
2390 static inline int
wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt * cfg)2391 wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
2392 {
2393 	return 0;
2394 }
2395 #endif
2396 
2397 /**
2398  * wlan_cfg_get_prealloc_cfg() - Get dp prealloc related cfg param
2399  * @ctrl_psoc: PSOC object
2400  * @cfg: cfg ctx where values will be populated
2401  *
2402  * Return: None
2403  */
2404 void
2405 wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
2406 			  struct wlan_dp_prealloc_cfg *cfg);
2407 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
2408 /**
2409  * wlan_cfg_get_pkt_capture_mode() - Get packet capture mode config
2410  * @cfg: config context
2411  *
2412  * Return: value of packet capture mode
2413  */
2414 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg);
2415 #else
2416 static inline
wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt * cfg)2417 uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
2418 {
2419 	return 0;
2420 }
2421 #endif
2422 
2423 /**
2424  * wlan_cfg_get_dp_soc_rx_mon_buf_ring_size() - Rx MON buf ring size
2425  * @cfg:  Configuration Handle
2426  *
2427  * Return: Size of Rx MON buf ring size
2428  */
2429 uint32_t
2430 wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2431 
2432 /**
2433  * wlan_cfg_get_dp_soc_tx_mon_buf_ring_size() - Tx MON buf ring size
2434  * @cfg:  Configuration Handle
2435  *
2436  * Return: Size of Tx MON buf ring size
2437  */
2438 uint32_t
2439 wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
2440 
2441 /**
2442  * wlan_cfg_get_dma_rx_mon_dest_ring_size() - Rx MON dest ring size
2443  * @cfg:  Configuration Handle
2444  *
2445  * Return: Size of Rx MON dest ring size
2446  */
2447 int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
2448 
2449 /**
2450  * wlan_cfg_get_dma_sw2rxdma_link_ring_size() - SW2RXDMA link ring size
2451  * @cfg:  Configuration Handle
2452  *
2453  * Return: Size of SW2RXDMA link ring size
2454  */
2455 int wlan_cfg_get_dma_sw2rxdma_link_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
2456 
2457 /**
2458  * wlan_cfg_get_dma_tx_mon_dest_ring_size() - Tx MON dest ring size
2459  * @cfg:  Configuration Handle
2460  *
2461  * Return: Size of Tx MON dest ring size
2462  */
2463 int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
2464 
2465 /**
2466  * wlan_cfg_get_rx_rel_ring_id() - get wbm2sw ring id for Rx release ring
2467  * @cfg: Configuration Handle
2468  *
2469  * Return: wbm2sw ring id
2470  */
2471 uint8_t
2472 wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg);
2473 
2474 /**
2475  * wlan_cfg_set_rx_rel_ring_id() - set wbm2sw ring id for Rx release ring
2476  * @cfg: soc configuration context
2477  * @wbm2sw_ring_id: wbm2sw ring id
2478  *
2479  * Return: None
2480  */
2481 void
2482 wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
2483 			    uint8_t wbm2sw_ring_id);
2484 
2485 /**
2486  * wlan_cfg_set_vdev_stats_hw_offload_config() - Set hw vdev stats offload
2487  *						 config
2488  * @cfg: config context
2489  * @value: value to be set
2490  *
2491  * Return: none
2492  */
2493 void
2494 wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
2495 					  bool value);
2496 
2497 /**
2498  * wlan_cfg_get_vdev_stats_hw_offload_config() - Get hw vdev stats offload
2499  *						 config
2500  * @cfg: config context
2501  *
2502  * Return: value of hw vdev stats config
2503  */
2504 bool
2505 wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg);
2506 
2507 /**
2508  * wlan_cfg_get_vdev_stats_hw_offload_timer()- Get hw vdev stats timer duration
2509  * @cfg: config context
2510  *
2511  * Return: value of hw vdev stats timer duration
2512  */
2513 int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg);
2514 
2515 /**
2516  * wlan_cfg_set_sawf_config() - Set SAWF config enable/disable
2517  * @cfg: config context
2518  * @value: value to be set
2519  *
2520  * Return: none
2521  */
2522 void
2523 wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool value);
2524 
2525 /**
2526  * wlan_cfg_get_sawf_config() - Get SAWF config enable/disable
2527  * @cfg: config context
2528  *
2529  * Return: true or false
2530  */
2531 bool
2532 wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg);
2533 
2534 /**
2535  * wlan_cfg_set_sawf_stats_config() - Set SAWF stats config
2536  * @cfg: config context
2537  * @value: value to be set
2538  *
2539  * Return: void
2540  */
2541 void
2542 wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg, uint8_t value);
2543 
2544 /**
2545  * wlan_cfg_get_sawf_stats_config() - Get SAWF stats config
2546  * @cfg: config context
2547  *
2548  * Return: value for sawf_stats_config
2549  */
2550 uint8_t
2551 wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg);
2552 
2553 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
2554 /**
2555  * wlan_cfg_mlo_rx_ring_map_get() - get rx ring map
2556  * @cfg: soc configuration context
2557  *
2558  * Return: rx_ring_map
2559  */
2560 uint8_t
2561 wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg);
2562 #endif
2563 
2564 /**
2565  * wlan_cfg_set_host2txmon_ring_mask() - Set host2txmon ring
2566  *                               interrupt mask mapped to an interrupt context
2567  * @cfg: Configuration Handle
2568  * @context: interrupt context
2569  * @mask: interrupt mask
2570  *
2571  * Return: None
2572  */
2573 void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
2574 				       int context, int mask);
2575 /**
2576  * wlan_cfg_get_host2txmon_ring_mask() - Return host2txmon ring
2577  *                               interrupt mask mapped to an interrupt context
2578  * @cfg: Configuration Handle
2579  * @context: Numerical ID identifying the Interrupt/NAPI context
2580  *
2581  * Return: int_host2txmon_ring_mask[context]
2582  */
2583 int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
2584 				      int context);
2585 /**
2586  * wlan_cfg_set_txmon_hw_support () - Set txmon hw support
2587  * @cfg:  Configuration Handle
2588  * @txmon_hw_support: value to set
2589  *
2590  * Return: None
2591  */
2592 void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
2593 				   bool txmon_hw_support);
2594 
2595 /**
2596  * wlan_cfg_get_txmon_hw_support () - Get txmon hw support
2597  * @cfg:  Configuration Handle
2598  *
2599  * Return: txmon_hw_support
2600  */
2601 bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg);
2602 
2603 void wlan_cfg_set_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg,
2604 					  bool txmon_sw_peer_filtering);
2605 bool wlan_cfg_get_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg);
2606 
2607 #ifdef WLAN_TX_PKT_CAPTURE_ENH
2608 /**
2609  * wlan_cfg_get_tx_capt_max_mem - Get max memory allowed for TX capture feature
2610  * @cfg: Configuration Handle
2611  *
2612  * Return: user given size in bytes
2613  */
2614 static inline int
wlan_cfg_get_tx_capt_max_mem(struct wlan_cfg_dp_soc_ctxt * cfg)2615 wlan_cfg_get_tx_capt_max_mem(struct wlan_cfg_dp_soc_ctxt *cfg)
2616 {
2617 	return cfg->tx_capt_max_mem_allowed;
2618 }
2619 
2620 /**
2621  * wlan_cfg_get_tx_capt_rbm_id - Get RBM_ID to be used for tx capture feature
2622  * @cfg: Configuration Handle
2623  * @idx: Pdev_id
2624  *
2625  * Return: Return Buffer manager id to be used
2626  */
2627 static inline int
wlan_cfg_get_tx_capt_rbm_id(struct wlan_cfg_dp_soc_ctxt * cfg,uint8_t idx)2628 wlan_cfg_get_tx_capt_rbm_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint8_t idx)
2629 {
2630 	if (idx >= MAX_PDEV_CNT) {
2631 		qdf_err("!!! pdev index is greater than expected");
2632 		qdf_assert(0);
2633 		/* resetting idx to zero */
2634 		idx = 0;
2635 	}
2636 
2637 	return cfg->tx_capt_rbm_id[idx];
2638 }
2639 #endif /* WLAN_TX_PKT_CAPTURE_ENH */
2640 
2641 #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
2642 /**
2643  * wlan_cfg_get_tx_ilp_inspect_config() - Get TX ILP configuration
2644  * @cfg: Configuration Handle
2645  *
2646  * Return: TX ILP enable or not
2647  */
2648 static inline bool
wlan_cfg_get_tx_ilp_inspect_config(struct wlan_cfg_dp_soc_ctxt * cfg)2649 wlan_cfg_get_tx_ilp_inspect_config(struct wlan_cfg_dp_soc_ctxt *cfg)
2650 {
2651 	return cfg->tx_pkt_inspect_for_ilp;
2652 }
2653 #endif
2654 
2655 /**
2656  * wlan_cfg_get_napi_scale_factor() - Get napi scale factor
2657  * @cfg: soc configuration context
2658  *
2659  * Return: napi scale factor
2660  */
2661 uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg);
2662 
2663 /**
2664  * wlan_cfg_soc_update_tgt_params() - Update band specific params
2665  * @wlan_cfg_ctx: SOC cfg context
2666  * @ctrl_obj: PSOC object
2667  *
2668  * Return: void
2669  */
2670 void
2671 wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
2672 			       struct cdp_ctrl_objmgr_psoc *ctrl_obj);
2673 
2674 /**
2675  * wlan_cfg_get_pointer_timer_threshold_rx() - Get timer threshold for RX
2676  *                                             pointer update
2677  * @cfg: soc configuration context
2678  *
2679  * Return: timer threshold for RX REO Dest ring  pointer update
2680  */
2681 uint16_t
2682 wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
2683 
2684 /**
2685  * wlan_cfg_get_pointer_num_threshold_rx() - Get number threshold for RX
2686  *                                           pointer update
2687  * @cfg: soc configuration context
2688  *
2689  * Return: entries number threshold for RX REO Dest ring  pointer update
2690  */
2691 uint8_t
2692 wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
2693 
2694 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
2695 static inline
wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt * cfg)2696 bool wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt *cfg)
2697 {
2698 	return cfg->local_pkt_capture;
2699 }
2700 #else
2701 static inline
wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt * cfg)2702 bool wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt *cfg)
2703 {
2704 	return false;
2705 }
2706 #endif
2707 
2708 /**
2709  * wlan_cfg_get_special_frame_cfg() - Get special frame mask
2710  * @cfg: soc configuration context
2711  *
2712  * Return: frame mask
2713  */
2714 uint32_t
2715 wlan_cfg_get_special_frame_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
2716 
2717 #ifdef DP_UMAC_HW_RESET_SUPPORT
2718 /**
2719  * wlan_cfg_get_umac_reset_buffer_window_ms() - Get umac reset buffer window
2720  * @cfg: soc configuration context
2721  *
2722  * Return: Umac reset buffer window in milliseconds
2723  */
2724 uint32_t
2725 wlan_cfg_get_umac_reset_buffer_window_ms(struct wlan_cfg_dp_soc_ctxt *cfg);
2726 #else
2727 static inline uint32_t
wlan_cfg_get_umac_reset_buffer_window_ms(struct wlan_cfg_dp_soc_ctxt * cfg)2728 wlan_cfg_get_umac_reset_buffer_window_ms(struct wlan_cfg_dp_soc_ctxt *cfg)
2729 {
2730 	return 0;
2731 }
2732 #endif /* DP_UMAC_HW_RESET_SUPPORT */
2733 
2734 /**
2735  * wlan_cfg_set_ast_indication_disable - Set AST disable
2736  *
2737  * @cfg: soc configuration context
2738  * @val: value to be set
2739  *
2740  * Return: void
2741  */
2742 void wlan_cfg_set_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg,
2743 					 bool val);
2744 
2745 /**
2746  * wlan_cfg_get_ast_indication_disable - Get AST disable
2747  *
2748  * @cfg: soc configuration context
2749  *
2750  * Return: true or false
2751  */
2752 bool wlan_cfg_get_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg);
2753 
2754 /**
2755  * wlan_cfg_get_dp_soc_dpdk_cfg - Return soc dpdk config
2756  * @psoc: psoc object
2757  *
2758  * Return: dpdk_cfg
2759  */
2760 int wlan_cfg_get_dp_soc_dpdk_cfg(struct cdp_ctrl_objmgr_psoc *psoc);
2761 #endif /*__WLAN_CFG_H*/
2762