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