xref: /wlan-dirver/qca-wifi-host-cmn/wlan_cfg/wlan_cfg.h (revision 3149adf58a329e17232a4c0e58d460d025edd55a)
1 /*
2 * * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef __WLAN_CFG_H
20 #define __WLAN_CFG_H
21 
22 /*
23  * Temporary place holders. These should come either from target config
24  * or platform configuration
25  */
26 #if defined(CONFIG_MCL)
27 #define MAX_PDEV_CNT 1
28 #define WLAN_CFG_INT_NUM_CONTEXTS 7
29 /*
30  * This mask defines how many transmit frames account for 1 NAPI work unit
31  * 0 means each tx completion is 1 unit
32  */
33 #define DP_TX_NAPI_BUDGET_DIV_MASK 0
34 #else
35 #define MAX_PDEV_CNT 3
36 #define WLAN_CFG_INT_NUM_CONTEXTS 4
37 /*
38  * This mask defines how many transmit frames account for 1 NAPI work unit
39  * 0xFFFF means each 64K tx frame completions account for 1 unit of NAPI budget
40  */
41 #define DP_TX_NAPI_BUDGET_DIV_MASK 0xFFFF
42 #endif
43 
44 /* Tx configuration */
45 #define MAX_LINK_DESC_BANKS 8
46 #define MAX_TXDESC_POOLS 4
47 #define MAX_TCL_DATA_RINGS 4
48 
49 /* Rx configuration */
50 #define MAX_RXDESC_POOLS 4
51 #define MAX_REO_DEST_RINGS 4
52 #define MAX_RX_MAC_RINGS 2
53 
54 /* DP process status */
55 #ifdef CONFIG_MCL
56 #define CONFIG_PROCESS_RX_STATUS 1
57 #define CONFIG_PROCESS_TX_STATUS 1
58 #else
59 #define CONFIG_PROCESS_RX_STATUS 0
60 #define CONFIG_PROCESS_TX_STATUS 0
61 #endif
62 
63 /* Miscellaneous configuration */
64 #define MAX_IDLE_SCATTER_BUFS 16
65 #define DP_MAX_IRQ_PER_CONTEXT 12
66 #define DP_MAX_INTERRUPT_CONTEXTS 8
67 #define DP_MAX_INTERRUPT_CONTEXTS 8
68 #define MAX_HTT_METADATA_LEN 32
69 #define MAX_NUM_PEER_ID_PER_PEER 8
70 #define DP_MAX_TIDS 17
71 #define DP_NON_QOS_TID 16
72 
73 struct wlan_cfg_dp_pdev_ctxt;
74 
75 /**
76  * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
77  * @num_int_ctxts - Number of NAPI/Interrupt contexts to be registered for DP
78  * @max_clients - Maximum number of peers/stations supported by device
79  * @max_alloc_size - Maximum allocation size for any dynamic memory
80  *			allocation request for this device
81  * @per_pdev_tx_ring - 0 - TCL ring is not mapped per radio
82  *		       1 - Each TCL ring is mapped to one radio/pdev
83  * @num_tcl_data_rings - Number of TCL Data rings supported by device
84  * @per_pdev_rx_ring - 0 - REO ring is not mapped per radio
85  *		       1 - Each REO ring is mapped to one radio/pdev
86  * @num_tx_desc_pool - Number of Tx Descriptor pools
87  * @num_tx_ext_desc_pool - Number of Tx MSDU extension Descriptor pools
88  * @num_tx_desc - Number of Tx Descriptors per pool
89  * @num_tx_ext_desc - Number of Tx MSDU extension Descriptors per pool
90  * @max_peer_id - Maximum value of peer id that FW can assign for a client
91  * @htt_packet_type - Default 802.11 encapsulation type for any VAP created
92  * @int_tx_ring_mask - Bitmap of Tx interrupts mapped to each NAPI/Intr context
93  * @int_rx_ring_mask - Bitmap of Rx interrupts mapped to each NAPI/Intr context
94  * @int_rx_mon_ring_mask - Bitmap of Rx monitor ring interrupts mapped to each
95  *			  NAPI/Intr context
96  * @int_rx_err_ring_mask - Bitmap of Rx err ring interrupts mapped to each
97  *			  NAPI/Intr context
98  * @int_wbm_rel_ring_mask - Bitmap of wbm rel ring interrupts mapped to each
99  *			  NAPI/Intr context
100  * @int_reo_status_ring_mask - Bitmap of reo status ring interrupts mapped to each
101  *                        NAPI/Intr context
102  * @int_ce_ring_mask - Bitmap of CE interrupts mapped to each NAPI/Intr context
103  * @lro_enabled - enable/disable lro feature
104  * @rx_hash - Enable hash based steering of rx packets
105  * @tso_enabled - enable/disable tso feature
106  * @napi_enabled - enable/disable interrupt mode for reaping tx and rx packets
107  * @tcp_Udp_Checksumoffload - enable/disable checksum offload
108  * @nss_cfg - nss configuration
109  */
110 struct wlan_cfg_dp_soc_ctxt {
111 	int num_int_ctxts;
112 	int max_clients;
113 	int max_alloc_size;
114 	int per_pdev_tx_ring;
115 	int num_tcl_data_rings;
116 	int per_pdev_rx_ring;
117 	int per_pdev_lmac_ring;
118 	int num_reo_dest_rings;
119 	int num_tx_desc_pool;
120 	int num_tx_ext_desc_pool;
121 	int num_tx_desc;
122 	int num_tx_ext_desc;
123 	int max_peer_id;
124 	int htt_packet_type;
125 	int int_batch_threshold_tx;
126 	int int_timer_threshold_tx;
127 	int int_batch_threshold_rx;
128 	int int_timer_threshold_rx;
129 	int int_batch_threshold_other;
130 	int int_timer_threshold_other;
131 	int tx_ring_size;
132 	int tx_comp_ring_size;
133 	int int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
134 	int int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
135 	int int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
136 	int int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
137 	int int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
138 	int int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
139 	int int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
140 	int int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
141 	int int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
142 	int hw_macid[MAX_PDEV_CNT];
143 	int base_hw_macid;
144 	bool lro_enabled;
145 	bool rx_hash;
146 	bool tso_enabled;
147 	bool napi_enabled;
148 	bool tcp_udp_checksumoffload;
149 	bool defrag_timeout_check;
150 	int nss_cfg;
151 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
152 	uint32_t tx_flow_stop_queue_threshold;
153 	uint32_t tx_flow_start_queue_offset;
154 #endif
155 	uint32_t rx_defrag_min_timeout;
156 };
157 
158 /**
159  * wlan_cfg_soc_attach() - Attach configuration interface for SoC
160  *
161  * Allocates context for Soc configuration parameters,
162  * Read configuration information from device tree/ini file and
163  * returns back handle
164  *
165  * Return: Handle to configuration context
166  */
167 struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void);
168 
169 /**
170  * wlan_cfg_soc_detach() - Detach soc configuration handle
171  * @wlan_cfg_ctx: soc configuration handle
172  *
173  * De-allocates memory allocated for SoC configuration
174  *
175  * Return:none
176  */
177 void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
178 
179 /**
180  * wlan_cfg_pdev_attach() Attach configuration interface for pdev
181  *
182  * Allocates context for pdev configuration parameters,
183  * Read configuration information from device tree/ini file and
184  * returns back handle
185  *
186  * Return: Handle to configuration context
187  */
188 struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_attach(void);
189 
190 /**
191  * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
192  * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
193  *
194  * Return: void
195  */
196 void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
197 
198 void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
199 void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
200 			       int context, int mask);
201 void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
202 			       int context, int mask);
203 void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
204 				   int context, int mask);
205 void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
206 			       int context, int mask);
207 void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
208 				  int mask);
209 void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
210 
211 int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
212 				int context, int mask);
213 int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
214 					int context, int mask);
215 int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
216 					int context, int mask);
217 /**
218  * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
219  * @wlan_cfg_ctx - Configuration Handle
220  *
221  * For WIN,  DP_NUM_INTERRUPT_CONTEXTS will be equal to  number of CPU cores.
222  * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
223  * rx_ring_mask ,and rx_monitor_ring mask  to indicate the rings
224  * that are processed by the handler.
225  *
226  * Return: num_contexts
227  */
228 int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
229 
230 /**
231  * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
232  *				 interrupt context
233  * @wlan_cfg_ctx - Configuration Handle
234  * @context - Numerical ID identifying the Interrupt/NAPI context
235  *
236  * Return: int_tx_ring_mask[context]
237  */
238 int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
239 		int context);
240 
241 /**
242  * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
243  *				 interrupt context
244  * @wlan_cfg_ctx - Configuration Handle
245  * @context - Numerical ID identifying the Interrupt/NAPI context
246  *
247  * Return: int_rx_ring_mask[context]
248  */
249 int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
250 		int context);
251 
252 /**
253  * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
254  *				   mapped to an interrupt context
255  * @wlan_cfg_ctx - Configuration Handle
256  * @context - Numerical ID identifying the Interrupt/NAPI context
257  *
258  * Return: int_rx_mon_ring_mask[context]
259  */
260 int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
261 		int context);
262 
263 /**
264  * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
265  *				   for the given interrupt context
266  * @wlan_cfg_ctx - Configuration Handle
267  * @context - Numerical ID identifying the Interrupt/NAPI context
268  *
269  */
270 void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
271 	int context, int mask);
272 
273 /**
274  * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
275  *				   mapped to an interrupt context
276  * @wlan_cfg_ctx - Configuration Handle
277  * @context - Numerical ID identifying the Interrupt/NAPI context
278  *
279  * Return: int_rxdma2host_ring_mask[context]
280  */
281 int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
282 	int context);
283 
284 /**
285  * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
286  *				   for the given interrupt context
287  * @wlan_cfg_ctx - Configuration Handle
288  * @context - Numerical ID identifying the Interrupt/NAPI context
289  *
290  */
291 void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
292 	int context, int mask);
293 
294 /**
295  * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
296  *				   mapped to an interrupt context
297  * @wlan_cfg_ctx - Configuration Handle
298  * @context - Numerical ID identifying the Interrupt/NAPI context
299  *
300  * Return: int_host2rxdma_ring_mask[context]
301  */
302 int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
303 	int context);
304 
305 /**
306  * wlan_cfg_set_hw_macid() - Set HW MAC Id for the given PDEV index
307  *
308  * @wlan_cfg_ctx - Configuration Handle
309  * @pdev_idx - Index of SW PDEV
310  * @hw_macid - HW MAC Id
311  *
312  */
313 void wlan_cfg_set_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
314 	int hw_macid);
315 
316 /**
317  * wlan_cfg_get_hw_macid() - Get HW MAC Id for the given PDEV index
318  *
319  * @wlan_cfg_ctx - Configuration Handle
320  * @pdev_idx - Index of SW PDEV
321  *
322  * Return: HW MAC Id
323  */
324 int wlan_cfg_get_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
325 
326 /**
327  * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
328  * PDEV index
329  *
330  * @wlan_cfg_ctx - Configuration Handle
331  * @pdev_idx - Index of SW PDEV
332  *
333  * Return: HW MAC index
334  */
335 int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
336 
337 /**
338  * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
339  *					   mapped to an interrupt context
340  * @wlan_cfg_ctx - Configuration Handle
341  * @context - Numerical ID identifying the Interrupt/NAPI context
342  *
343  * Return: int_rx_err_ring_mask[context]
344  */
345 int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
346 				  context);
347 
348 /**
349  * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
350  *					   mapped to an interrupt context
351  * @wlan_cfg_ctx - Configuration Handle
352  * @context - Numerical ID identifying the Interrupt/NAPI context
353  *
354  * Return: int_wbm_rel_ring_mask[context]
355  */
356 int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
357 				      context);
358 
359 /**
360  * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
361  *					   mapped to an interrupt context
362  * @wlan_cfg_ctx - Configuration Handle
363  * @context - Numerical ID identifying the Interrupt/NAPI context
364  *
365  * Return: int_reo_status_ring_mask[context]
366  */
367 int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
368 				      context);
369 
370 /**
371  * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
372  *				mapped to an interrupt context
373  * @wlan_cfg_ctx - Configuration Handle
374  * @context - Numerical ID identifying the Interrupt/NAPI context
375  *
376  * Return: int_ce_ring_mask[context]
377  */
378 int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
379 		int context);
380 
381 /**
382  * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
383  *				supported by device
384  * @wlan_cfg_ctx - Configuration Handle
385  *
386  * Return: max_clients
387  */
388 uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
389 
390 /**
391  * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
392  *			    memory allocation request for this device
393  * @wlan_cfg_ctx - Configuration Handle
394  *
395  * Return: max_alloc_size
396  */
397 uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
398 
399 /*
400  * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
401  *			       one per radio
402  * @wlan_cfg_ctx - Configuration Handle
403  *
404  * Return: per_pdev_tx_ring
405  */
406 int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
407 
408 /*
409  * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings supported by device
410  * @wlan_cfg_ctx
411  *
412  * Return: num_tcl_data_rings
413  */
414 int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
415 
416 /*
417  * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
418  *                              one per radio
419  * @wlan_cfg_ctx
420  *
421  * Return: per_pdev_rx_ring
422  */
423 int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
424 
425 /*
426  * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
427  *                              one per radio
428  * @wlan_cfg_ctx
429  *
430  * Return: return 1 if per pdev error ring else 0
431  */
432 int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
433 
434 /*
435  * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings supported by device
436  * @wlan_cfg_ctx - Configuration Handle
437  *
438  * Return: num_reo_dest_rings
439  */
440 int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
441 
442 /*
443  * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
444  * @wlan_cfg_ctx - Configuration Handle
445  *
446  * Return: htt_pkt_type_ethernet
447  */
448 int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
449 
450 /*
451  * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
452  *					device
453  * @wlan_cfg_ctx - Configuration Handle
454  *
455  * Return: num_tx_desc_pool
456  */
457 int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
458 
459 /*
460  * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
461  *					device
462  * @wlan_cfg_ctx - Configuration Handle
463  * @num_pool - Number of pool
464  */
465 void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
466 
467 /*
468  * wlan_cfg_get_num_tx_ext_desc_pool() -  Number of Tx MSDU ext Descriptor
469  *					pools
470  * @wlan_cfg_ctx - Configuration Handle
471  *
472  * Return: num_tx_ext_desc_pool
473  */
474 int wlan_cfg_get_num_tx_ext_desc_pool(
475 		struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
476 
477 /*
478  * wlan_cfg_set_num_tx_ext_desc_pool() -  Set the number of Tx MSDU ext Descriptor
479  *					pools
480  * @wlan_cfg_ctx - Configuration Handle
481  * @num_pool - Number of pool
482  */
483 void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
484 
485 /*
486  * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
487  * @wlan_cfg_ctx - Configuration Handle
488  *
489  * Return: num_tx_desc
490  */
491 int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
492 
493 /*
494  * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
495  *
496  * @wlan_cfg_ctx - Configuration Handle
497  * @num_desc: Number of descriptor
498  */
499 void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
500 
501 /*
502  * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
503  *					per pool
504  * @wlan_cfg_ctx - Configuration Handle
505  *
506  * Return: num_tx_ext_desc
507  */
508 int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
509 
510 /*
511  * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors
512  *					per pool
513  * @wlan_cfg_ctx - Configuration Handle
514  * @num_desc: Number of descriptor
515  */
516 void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc);
517 
518 /*
519  * wlan_cfg_max_peer_id() - Get maximum peer ID
520  * @cfg: Configuration Handle
521  *
522  * Return: maximum peer ID
523  */
524 uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
525 
526 /*
527  * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
528  * @wlan_cfg_pdev_ctx
529  *
530  * Return: dma_mon_buf_ring_size
531  */
532 int wlan_cfg_get_dma_mon_buf_ring_size(
533 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
534 
535 /*
536  * wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor
537  *					Destination ring
538  * @wlan_cfg_pdev_ctx
539  *
540  * Return: dma_mon_dest_size
541  */
542 int wlan_cfg_get_dma_mon_dest_ring_size(
543 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
544 
545 /*
546  * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
547  * @wlan_cfg_pdev_ctx
548  *
549  * Return: dma_mon_stat_ring_size
550  */
551 int wlan_cfg_get_dma_mon_stat_ring_size(
552 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
553 
554 /*
555  * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
556  * @wlan_cfg_pdev_ctx
557  *
558  * Return: rx_dma_buf_ring_size
559  */
560 int wlan_cfg_get_rx_dma_buf_ring_size(
561 		struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
562 
563 /*
564  * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
565  * per pdev
566  * @wlan_cfg_pdev_ctx
567  *
568  * Return: number of mac DMA rings per pdev
569  */
570 int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
571 
572 /*
573  * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
574  * @wlan_cfg_pdev_ctx
575  *
576  * Return: true - LRO enabled false - LRO disabled
577  */
578 bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
579 
580 /*
581  * wlan_cfg_is_lro_enabled - Return RX hash enabled/disabled
582  * @wlan_cfg_pdev_ctx
583  *
584  * Return: true - enabled false - disabled
585  */
586 bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
587 
588 /*
589  * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
590  * @wlan_cfg_soc_ctx
591  * @rx_hash
592  */
593 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
594 
595 /*
596  * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
597  * @wlan_cfg_pdev_ctx
598  *
599  * Return: 1 - enabled 0 - disabled
600  */
601 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
602 
603 /*
604  * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
605  * @wlan_cfg_pdev_ctx
606  */
607 void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
608 
609 /*
610  * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
611  * @wlan_cfg_pdev_ctx
612  *
613  * Return: nss_cfg
614  */
615 int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
616 
617 /*
618  * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
619  * @wlan_cfg_pdev_ctx
620  *
621  */
622 void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
623 
624 /*
625  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
626  * @wlan_cfg_soc_ctx
627  *
628  * Return: Batch threshold
629  */
630 int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
631 
632 /*
633  * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
634  * @wlan_cfg_soc_ctx
635  *
636  * Return: Timer threshold
637  */
638 int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
639 
640 /*
641  * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
642  * @wlan_cfg_soc_ctx
643  *
644  * Return: Batch threshold
645  */
646 int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
647 
648 /*
649  * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
650  * @wlan_cfg_soc_ctx
651  *
652  * Return: Timer threshold
653  */
654 int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
655 
656 /*
657  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
658  * @wlan_cfg_soc_ctx
659  *
660  * Return: Batch threshold
661  */
662 int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
663 
664 /*
665  * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
666  * @wlan_cfg_soc_ctx
667  *
668  * Return: Timer threshold
669  */
670 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
671 
672 /*
673  * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
674  * @wlan_cfg_soc_ctx
675  *
676  * Return: Checksum offload enable or disable
677  */
678 int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
679 
680 /*
681  * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
682  * @wlan_cfg_soc_ctx
683  *
684  * Return: Tx Ring Size
685  */
686 int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
687 
688 /*
689  * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
690  * @wlan_cfg_soc_ctx
691  *
692  * Return: Tx Completion ring size
693  */
694 int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
695 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
696 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
697 
698 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
699 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
700 int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
701 
702 int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
703 #endif
704