xref: /wlan-driver/qcacld-3.0/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. 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 /**
20  * DOC: wlan_dp_ucfg_api.h
21  *
22  * TDLS north bound interface declaration
23  */
24 
25 #if !defined(_WLAN_DP_UCFG_API_H_)
26 #define _WLAN_DP_UCFG_API_H_
27 
28 #include <scheduler_api.h>
29 #include <wlan_objmgr_cmn.h>
30 #include <wlan_objmgr_psoc_obj.h>
31 #include <wlan_objmgr_pdev_obj.h>
32 #include <wlan_objmgr_vdev_obj.h>
33 #include "pld_common.h"
34 #include <wlan_dp_public_struct.h>
35 #include <cdp_txrx_misc.h>
36 #include "wlan_dp_objmgr.h"
37 #include "wlan_qmi_public_struct.h"
38 
39 #define DP_IGNORE_NUD_FAIL                      0
40 #define DP_DISCONNECT_AFTER_NUD_FAIL            1
41 #define DP_ROAM_AFTER_NUD_FAIL                  2
42 #define DP_DISCONNECT_AFTER_ROAM_FAIL           3
43 
44 #ifdef WLAN_NUD_TRACKING
45 bool
46 ucfg_dp_is_roam_after_nud_enabled(struct wlan_objmgr_psoc *psoc);
47 
48 bool
49 ucfg_dp_is_disconect_after_roam_fail(struct wlan_objmgr_psoc *psoc);
50 #else
51 static inline bool
ucfg_dp_is_roam_after_nud_enabled(struct wlan_objmgr_psoc * psoc)52 ucfg_dp_is_roam_after_nud_enabled(struct wlan_objmgr_psoc *psoc)
53 {
54 	return false;
55 }
56 
57 static inline bool
ucfg_dp_is_disconect_after_roam_fail(struct wlan_objmgr_psoc * psoc)58 ucfg_dp_is_disconect_after_roam_fail(struct wlan_objmgr_psoc *psoc)
59 {
60 	return false;
61 }
62 #endif
63 
64 /**
65  * ucfg_dp_update_link_mac_addr() - Update the dp_link mac address, during MLO
66  *				    link switch.
67  * @vdev: Objmgr vdev corresponding to the dp_link
68  * @new_mac_addr: New mac address of the dp_link
69  * @is_link_switch: Flag to indicate if the link mac addr update is as a part
70  *		    of MLO link switch.
71  *
72  * Return: QDF_STATUS
73  */
74 QDF_STATUS ucfg_dp_update_link_mac_addr(struct wlan_objmgr_vdev *vdev,
75 					struct qdf_mac_addr *new_mac_addr,
76 					bool is_link_switch);
77 
78 /**
79  * ucfg_dp_update_def_link() - update DP interface default link
80  * @psoc: psoc handle
81  * @intf_mac: interface MAC address
82  * @vdev: objmgr vdev handle to set the def_link in dp_intf
83  *
84  */
85 void ucfg_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
86 			     struct qdf_mac_addr *intf_mac,
87 			     struct wlan_objmgr_vdev *vdev);
88 
89 /**
90  * ucfg_dp_update_intf_mac() - update DP interface MAC address
91  * @psoc: psoc handle
92  * @cur_mac: Current MAC address
93  * @new_mac: new MAC address
94  * @vdev: objmgr vdev handle to set the def_link in dp_intf
95  *
96  */
97 void ucfg_dp_update_intf_mac(struct wlan_objmgr_psoc *psoc,
98 			     struct qdf_mac_addr *cur_mac,
99 			     struct qdf_mac_addr *new_mac,
100 			     struct wlan_objmgr_vdev *vdev);
101 
102 /**
103  * ucfg_dp_destroy_intf() - DP module interface deletion
104  * @psoc: psoc handle
105  * @intf_addr: Interface MAC address
106  *
107  */
108 QDF_STATUS ucfg_dp_destroy_intf(struct wlan_objmgr_psoc *psoc,
109 				struct qdf_mac_addr *intf_addr);
110 
111 /**
112  * ucfg_dp_create_intf() - DP module interface creation
113  * @psoc: psoc handle
114  * @intf_addr: Interface MAC address
115  * @ndev : netdev object
116  *
117  */
118 QDF_STATUS ucfg_dp_create_intf(struct wlan_objmgr_psoc *psoc,
119 			       struct qdf_mac_addr *intf_addr,
120 			       qdf_netdev_t ndev);
121 
122 void ucfg_dp_set_hif_handle(struct wlan_objmgr_psoc *psoc,
123 			    struct hif_opaque_softc *hif_handle);
124 void ucfg_dp_set_cmn_dp_handle(struct wlan_objmgr_psoc *psoc,
125 			       ol_txrx_soc_handle soc);
126 /**
127  * ucfg_dp_init() - DP module initialization API
128  *
129  * Return: QDF_STATUS
130  */
131 QDF_STATUS ucfg_dp_init(void);
132 
133 /**
134  * ucfg_dp_deinit() - DP module deinitialization API
135  *
136  * Return: QDF_STATUS
137  */
138 QDF_STATUS ucfg_dp_deinit(void);
139 
140 /**
141  * ucfg_dp_psoc_open() - DP component Open
142  * @psoc: pointer to psoc object
143  *
144  * Return: QDF Status
145  */
146 QDF_STATUS ucfg_dp_psoc_open(struct wlan_objmgr_psoc *psoc);
147 
148 /**
149  * ucfg_dp_psoc_close() - DP component Close
150  * @psoc: pointer to psoc object
151  *
152  * Return: QDF Status
153  */
154 QDF_STATUS ucfg_dp_psoc_close(struct wlan_objmgr_psoc *psoc);
155 
156 /**
157  * ucfg_dp_suspend_wlan() - update suspend state in DP component
158  * @psoc: pointer to psoc object
159  *
160  * Return: None
161  */
162 void ucfg_dp_suspend_wlan(struct wlan_objmgr_psoc *psoc);
163 
164 /**
165  * ucfg_dp_resume_wlan() - update resume state in DP component
166  * @psoc: pointer to psoc object
167  *
168  * Return: None
169  */
170 void ucfg_dp_resume_wlan(struct wlan_objmgr_psoc *psoc);
171 
172 /**
173  * ucfg_dp_update_config() - DP module config update
174  * @psoc: pointer to psoc object
175  * @req : user config
176  *
177  * Return: QDF_STATUS
178  */
179 QDF_STATUS
180 ucfg_dp_update_config(struct wlan_objmgr_psoc *psoc,
181 		      struct wlan_dp_user_config *req);
182 /**
183  * ucfg_dp_wait_complete_tasks() - wait for DP tasks to complete
184  * Called from legacy layer to wait DP tasks completion
185  *
186  * Return: None
187  */
188 void
189 ucfg_dp_wait_complete_tasks(void);
190 
191 /**
192  * ucfg_dp_remove_conn_info() - Remove DP STA intf connection info
193  * @vdev: vdev mapped to STA DP interface
194  *
195  * Return: QDF_STATUS
196  */
197 void
198 ucfg_dp_remove_conn_info(struct wlan_objmgr_vdev *vdev);
199 
200 /**
201  * ucfg_dp_conn_info_set_bssid() - set BSSID info in STA intf
202  * @vdev: vdev mapped to STA DP interface
203  * @bssid: BSSID mac
204  *
205  * Return: None
206  */
207 void ucfg_dp_conn_info_set_bssid(struct wlan_objmgr_vdev *vdev,
208 				 struct qdf_mac_addr *bssid);
209 
210 /**
211  * ucfg_dp_conn_info_set_arp_service() - set ARP service info
212  * @vdev: vdev mapped to STA DP interface
213  * @proxy_arp_service: ARP service info
214  *
215  * Return: None
216  */
217 void ucfg_dp_conn_info_set_arp_service(struct wlan_objmgr_vdev *vdev,
218 				       uint8_t proxy_arp_service);
219 
220 /**
221  * ucfg_dp_conn_info_set_peer_authenticate() - set Peer authenticated state
222  * @vdev: vdev mapped to STA DP interface
223  * @is_authenticated: Peer authenticated info
224  *
225  * Return: None
226  */
227 void ucfg_dp_conn_info_set_peer_authenticate(struct wlan_objmgr_vdev *vdev,
228 					     uint8_t is_authenticated);
229 
230 /**
231  * ucfg_dp_conn_info_set_peer_mac() - set peer mac info in DP intf
232  * @vdev: vdev mapped to STA DP interface
233  * @peer_mac: Peer MAC information
234  *
235  * Return: None
236  */
237 void ucfg_dp_conn_info_set_peer_mac(struct wlan_objmgr_vdev *vdev,
238 				    struct qdf_mac_addr *peer_mac);
239 
240 /**
241  * ucfg_dp_softap_check_wait_for_tx_eap_pkt() - wait for TX EAP pkt in SAP
242  * @vdev: vdev mapped to SAP DP interface
243  * @mac_addr: Peer MAC address info
244  *
245  * Return: None
246  */
247 void ucfg_dp_softap_check_wait_for_tx_eap_pkt(struct wlan_objmgr_vdev *vdev,
248 					      struct qdf_mac_addr *mac_addr);
249 
250 /**
251  * ucfg_dp_update_dhcp_state_on_disassoc() - update DHCP during disassoc
252  * @vdev: vdev mapped to SAP DP interface
253  * @mac_addr: Peer MAC address info
254  *
255  * Return: None
256  */
257 void ucfg_dp_update_dhcp_state_on_disassoc(struct wlan_objmgr_vdev *vdev,
258 					   struct qdf_mac_addr *mac_addr);
259 
260 /**
261  * ucfg_dp_set_dfs_cac_tx() - update DFS CAC TX block info
262  * @vdev: vdev mapped to SAP DP interface
263  * @tx_block: true if TX need to be blocked
264  *
265  * Return: None
266  */
267 void ucfg_dp_set_dfs_cac_tx(struct wlan_objmgr_vdev *vdev,
268 			    bool tx_block);
269 
270 /**
271  * ucfg_dp_set_bss_state_start() - update BSS state for SAP intf
272  * @vdev: vdev mapped to SAP DP interface
273  * @start: true if BSS state is started
274  *
275  * Return: None
276  */
277 void ucfg_dp_set_bss_state_start(struct wlan_objmgr_vdev *vdev, bool start);
278 
279 /**
280  * ucfg_dp_lro_set_reset() - LRO set/reset in DP
281  * @vdev: vdev mapped to DP interface
282  * @enable_flag: Enable/disable LRO feature
283  *
284  * Return: 0 on success and non zero on failure.
285  */
286 QDF_STATUS ucfg_dp_lro_set_reset(struct wlan_objmgr_vdev *vdev,
287 				 uint8_t enable_flag);
288 /**
289  * ucfg_dp_is_ol_enabled() - Get ol enable/disable info
290  * @psoc: PSOC mapped to DP context
291  *
292  * Return: true if OL enabled
293  */
294 bool ucfg_dp_is_ol_enabled(struct wlan_objmgr_psoc *psoc);
295 
296 #ifdef RECEIVE_OFFLOAD
297 /**
298  * ucfg_dp_rx_handle_concurrency() - Handle concurrency setting in DP
299  * @psoc: PSOC mapped to DP context
300  * @disable: true/false to disable/enable the Rx offload
301  *
302  * Return: None
303  */
304 void ucfg_dp_rx_handle_concurrency(struct wlan_objmgr_psoc *psoc,
305 				   bool disable);
306 #else
307 static inline
ucfg_dp_rx_handle_concurrency(struct wlan_objmgr_psoc * psoc,bool disable)308 void ucfg_dp_rx_handle_concurrency(struct wlan_objmgr_psoc *psoc,
309 				   bool disable) { }
310 #endif
311 
312 /**
313  * ucfg_dp_is_rx_common_thread_enabled() - Get common thread enable/disable info
314  * @psoc: PSOC mapped to DP context
315  *
316  * Return: true if common thread enabled
317  */
318 bool ucfg_dp_is_rx_common_thread_enabled(struct wlan_objmgr_psoc *psoc);
319 
320 /**
321  * ucfg_dp_is_rx_threads_enabled() - Get RX DP threads info
322  * @psoc: PSOC mapped to DP context
323  *
324  * Return: true if DP RX threads enabled
325  */
326 bool ucfg_dp_is_rx_threads_enabled(struct wlan_objmgr_psoc *psoc);
327 
328 /**
329  * ucfg_dp_rx_ol_init() - Initialize Rx offload mode (LRO or GRO)
330  * @psoc: PSOC mapped to DP context
331  * @is_wifi3_0_target: true if it wifi3.0 target
332  *
333  * Return: 0 on success and non zero on failure.
334  */
335 QDF_STATUS ucfg_dp_rx_ol_init(struct wlan_objmgr_psoc *psoc,
336 			      bool is_wifi3_0_target);
337 
338 /**
339  * ucfg_dp_start_xmit() - Transmit packet on STA interface
340  * @nbuf: n/w buffer to transmitted
341  * @vdev: vdev mapped to STA DP interface
342  *
343  * Return: 0 on success and non zero on failure.
344  */
345 QDF_STATUS
346 ucfg_dp_start_xmit(qdf_nbuf_t nbuf, struct wlan_objmgr_vdev *vdev);
347 
348 /**
349  * ucfg_dp_rx_packet_cbk() - Receive packet on STA interface
350  * @nbuf: n/w buffer to be received
351  * @vdev: vdev mapped to STA DP interface
352  *
353  * Return: 0 on success and non zero on failure.
354  */
355 QDF_STATUS ucfg_dp_rx_packet_cbk(struct wlan_objmgr_vdev *vdev,
356 				 qdf_nbuf_t nbuf);
357 
358 /**
359  * ucfg_dp_tx_timeout() - called during transmission timeout on STA
360  * @vdev: vdev mapped to STA DP interface
361  *
362  * Return: None
363  */
364 void ucfg_dp_tx_timeout(struct wlan_objmgr_vdev *vdev);
365 
366 /**
367  * ucfg_dp_softap_tx_timeout() - called during transmission timeout on SAP
368  * @vdev: vdev mapped to SAP DP interface
369  *
370  * Return: None
371  */
372 void ucfg_dp_softap_tx_timeout(struct wlan_objmgr_vdev *vdev);
373 
374 /**
375  * ucfg_dp_softap_start_xmit() - Transmit packet on SAP interface
376  * @nbuf: n/w buffer to transmitted
377  * @vdev: vdev mapped to SAP DP interface
378  *
379  * Return: 0 on success and non zero on failure.
380  */
381 QDF_STATUS
382 ucfg_dp_softap_start_xmit(qdf_nbuf_t nbuf, struct wlan_objmgr_vdev *vdev);
383 
384 /**
385  * ucfg_dp_get_dev_stats() - Get netdev stats info
386  * @dev: Pointer to network device
387  *
388  * Return: qdf_net_dev_stats info
389  */
390 qdf_net_dev_stats *ucfg_dp_get_dev_stats(qdf_netdev_t dev);
391 
392 /**
393  * ucfg_dp_inc_rx_pkt_stats() - DP increment RX pkt stats
394  * @vdev: VDEV mapped to DP interface
395  * @pkt_len: packet length to be incremented in stats
396  * @delivered: pkts delivered or not
397  *
398  * Return: None
399  */
400 void ucfg_dp_inc_rx_pkt_stats(struct wlan_objmgr_vdev *vdev,
401 			      uint32_t pkt_len,
402 			      bool delivered);
403 
404 /**
405  * ucfg_dp_get_rx_softirq_yield_duration() - Get rx soft IRQ yield duration
406  * @psoc: pointer to psoc object
407  *
408  * Return: soft IRQ yield duration
409  */
410 uint64_t
411 ucfg_dp_get_rx_softirq_yield_duration(struct wlan_objmgr_psoc *psoc);
412 
413 /**
414  * ucfg_dp_register_rx_mic_error_ind_handler : register mic error handler.
415  * @soc: soc handle
416  */
417 void ucfg_dp_register_rx_mic_error_ind_handler(void *soc);
418 
419 /**
420  * ucfg_dp_sta_register_txrx_ops() - Register ops for TX/RX operations in STA
421  * @vdev: vdev mapped to STA DP interface
422  *
423  * Return: 0 on success and non zero on failure.
424  */
425 QDF_STATUS ucfg_dp_sta_register_txrx_ops(struct wlan_objmgr_vdev *vdev);
426 
427 #ifdef FEATURE_WLAN_TDLS
428 /**
429  * ucfg_dp_tdlsta_register_txrx_ops() - Register ops for TX/RX operations
430  * @vdev: vdev mapped to TDLS STA DP interface
431  *
432  * Return: 0 on success and non zero on failure.
433  */
434 QDF_STATUS ucfg_dp_tdlsta_register_txrx_ops(struct wlan_objmgr_vdev *vdev);
435 #else
436 static inline
ucfg_dp_tdlsta_register_txrx_ops(struct wlan_objmgr_vdev * vdev)437 QDF_STATUS ucfg_dp_tdlsta_register_txrx_ops(struct wlan_objmgr_vdev *vdev)
438 {
439 	return QDF_STATUS_E_NOSUPPORT;
440 }
441 #endif
442 
443 /**
444  * ucfg_dp_ocb_register_txrx_ops() - Register ops for TX/RX operations
445  * @vdev: vdev mapped to OCB DP interface
446  *
447  * Return: 0 on success and non zero on failure.
448  */
449 QDF_STATUS ucfg_dp_ocb_register_txrx_ops(struct wlan_objmgr_vdev *vdev);
450 
451 #ifdef FEATURE_MONITOR_MODE_SUPPORT
452 /**
453  * ucfg_dp_mon_register_txrx_ops() - Register ops for TX/RX operations
454  * @vdev: vdev mapped to Monitor mode DP interface
455  *
456  * Return: 0 on success and non zero on failure.
457  */
458 QDF_STATUS ucfg_dp_mon_register_txrx_ops(struct wlan_objmgr_vdev *vdev);
459 #else
460 static inline
ucfg_dp_mon_register_txrx_ops(struct wlan_objmgr_vdev * vdev)461 QDF_STATUS ucfg_dp_mon_register_txrx_ops(struct wlan_objmgr_vdev *vdev)
462 {
463 	return QDF_STATUS_E_NOSUPPORT;
464 }
465 #endif
466 
467 /**
468  * ucfg_dp_softap_register_txrx_ops() - Register ops for TX/RX operations
469  * @vdev: vdev mapped to SAP mode DP interface
470  * @txrx_ops: Tx and Rx data transfer ops
471  *
472  * Return: 0 on success and non zero on failure.
473  */
474 QDF_STATUS ucfg_dp_softap_register_txrx_ops(struct wlan_objmgr_vdev *vdev,
475 					    struct ol_txrx_ops *txrx_ops);
476 
477 /**
478  * ucfg_dp_register_pkt_capture_callbacks() - Register ops for pkt capture operations
479  * @vdev: vdev mapped to DP interface
480  *
481  * Return: 0 on success and non zero on failure.
482  */
483 QDF_STATUS
484 ucfg_dp_register_pkt_capture_callbacks(struct wlan_objmgr_vdev *vdev);
485 
486 /**
487  * ucfg_dp_bbm_context_init() - Initialize BBM context
488  * @psoc: psoc handle
489  *
490  * Returns: error code
491  */
492 int ucfg_dp_bbm_context_init(struct wlan_objmgr_psoc *psoc);
493 
494 /**
495  * ucfg_dp_bbm_context_deinit() - De-initialize BBM context
496  * @psoc: psoc handle
497  *
498  * Returns: None
499  */
500 void ucfg_dp_bbm_context_deinit(struct wlan_objmgr_psoc *psoc);
501 
502 /**
503  * ucfg_dp_bbm_apply_independent_policy() - Apply independent policies
504  *  to set the bus bw level
505  * @psoc: psoc handle
506  * @params: BBM policy related params
507  *
508  * The function applies BBM related policies and appropriately sets the bus
509  * bandwidth level.
510  *
511  * Returns: None
512  */
513 void ucfg_dp_bbm_apply_independent_policy(struct wlan_objmgr_psoc *psoc,
514 					  struct bbm_params *params);
515 
516 /**
517  * ucfg_dp_periodic_sta_stats_start() - Start displaying periodic stats for STA
518  * @vdev: Pointer to the vdev
519  *
520  * Return: none
521  */
522 void ucfg_dp_periodic_sta_stats_start(struct wlan_objmgr_vdev *vdev);
523 
524 /**
525  * ucfg_dp_periodic_sta_stats_stop() - Stop displaying periodic stats for STA
526  * @vdev: Pointer to the vdev
527  *
528  * Return: none
529  */
530 void ucfg_dp_periodic_sta_stats_stop(struct wlan_objmgr_vdev *vdev);
531 
532 /**
533  * ucfg_dp_set_rx_mode_rps() - Enable/disable RPS in SAP mode
534  * @enable: Set true to enable RPS in SAP mode
535  *
536  * Callback function registered with datapath
537  *
538  * Return: none
539  */
540 void ucfg_dp_set_rx_mode_rps(bool enable);
541 
542 /**
543  * ucfg_dp_try_send_rps_ind() - send rps indication to daemon
544  * @vdev: vdev handle
545  *
546  * If RPS feature enabled by INI, send RPS enable indication to daemon
547  * Indication contents is the name of interface to find correct sysfs node
548  * Should send all available interfaces
549  *
550  * Return: none
551  */
552 void ucfg_dp_try_send_rps_ind(struct wlan_objmgr_vdev *vdev);
553 
554 /**
555  * ucfg_dp_reg_ipa_rsp_ind() - Resiter RSP IND cb with IPA component
556  * @pdev: pdev handle
557  *
558  * Returns: None
559  */
560 void ucfg_dp_reg_ipa_rsp_ind(struct wlan_objmgr_pdev *pdev);
561 
562 /**
563  * ucfg_dp_try_set_rps_cpu_mask - set RPS CPU mask for interfaces
564  * @psoc: psoc handle
565  *
566  * Return: none
567  */
568 void ucfg_dp_try_set_rps_cpu_mask(struct wlan_objmgr_psoc *psoc);
569 
570 /**
571  * ucfg_dp_add_latency_critical_client() - Add latency critical client
572  * @vdev: vdev handle (Should not be NULL)
573  * @phymode: the phymode of the connected adapter
574  *
575  * This function checks if the present connection is latency critical
576  * and adds to the latency critical clients count and informs the
577  * datapath about this connection being latency critical.
578  *
579  * Returns: None
580  */
581 void ucfg_dp_add_latency_critical_client(struct wlan_objmgr_vdev *vdev,
582 					 enum qca_wlan_802_11_mode phymode);
583 
584 /**
585  * ucfg_dp_del_latency_critical_client() - Remove latency critical client
586  * @vdev: vdev handle (Should not be NULL)
587  * @phymode: the phymode of the connected adapter
588  *
589  * This function checks if the present connection was latency critical
590  * and removes from the latency critical clients count and informs the
591  * datapath about the removed connection being latency critical.
592  *
593  * Returns: None
594  */
595 void ucfg_dp_del_latency_critical_client(struct wlan_objmgr_vdev *vdev,
596 					 enum qca_wlan_802_11_mode phymode);
597 
598 /**
599  * ucfg_dp_reset_tcp_delack() - Reset TCP delay ACK
600  * level
601  * @psoc: psoc handle
602  *
603  * Return: None
604  */
605 void ucfg_dp_reset_tcp_delack(struct wlan_objmgr_psoc *psoc);
606 
607 /**
608  * ucfg_dp_set_current_throughput_level() - update the current vote
609  * level
610  * @psoc: psoc handle
611  * @next_vote_level: pld_bus_width_type voting level
612  *
613  * This function updates the current vote level to the new level
614  * provided
615  *
616  * Return: None
617  */
618 void
619 ucfg_dp_set_current_throughput_level(struct wlan_objmgr_psoc *psoc,
620 				     enum pld_bus_width_type next_vote_level);
621 
622 /**
623  * ucfg_wlan_dp_display_tx_rx_histogram() - display tx rx histogram
624  * @psoc: psoc handle
625  *
626  * Return: none
627  */
628 void ucfg_wlan_dp_display_tx_rx_histogram(struct wlan_objmgr_psoc *psoc);
629 
630 /**
631  * ucfg_wlan_dp_clear_tx_rx_histogram() - clear tx rx histogram
632  * @psoc: psoc handle
633  *
634  * Return: none
635  */
636 void ucfg_wlan_dp_clear_tx_rx_histogram(struct wlan_objmgr_psoc *psoc);
637 
638 /**
639  * ucfg_dp_set_high_bus_bw_request() - Set high bandwidth request.
640  * @psoc: psoc handle
641  * @vdev_id: vdev_id
642  * @high_bus_bw : High bus bandwidth requested
643  *
644  * Return: None.
645  */
646 void
647 ucfg_dp_set_high_bus_bw_request(struct wlan_objmgr_psoc *psoc,
648 				uint8_t vdev_id,
649 				bool high_bus_bw);
650 
651 /**
652  * ucfg_dp_bus_bw_compute_timer_start() - start the bandwidth timer
653  * @psoc: psoc handle
654  *
655  * Return: None
656  */
657 void ucfg_dp_bus_bw_compute_timer_start(struct wlan_objmgr_psoc *psoc);
658 
659 /**
660  * ucfg_dp_bus_bw_compute_timer_try_start() - try to start the bandwidth timer
661  * @psoc: psoc handle
662  *
663  * This function ensures there is at least one intf in the associated state
664  * before starting the bandwidth timer.
665  *
666  * Return: None
667  */
668 void ucfg_dp_bus_bw_compute_timer_try_start(struct wlan_objmgr_psoc *psoc);
669 
670 /**
671  * ucfg_dp_bus_bw_compute_timer_stop() - stop the bandwidth timer
672  * @psoc: psoc handle
673  *
674  * Return: None
675  */
676 void ucfg_dp_bus_bw_compute_timer_stop(struct wlan_objmgr_psoc *psoc);
677 
678 /**
679  * ucfg_dp_bus_bw_compute_timer_try_stop() - try to stop the bandwidth timer
680  * @psoc: psoc handle
681  *
682  * This function ensures there are no interface in the associated state before
683  * stopping the bandwidth timer.
684  *
685  * Return: None
686  */
687 void ucfg_dp_bus_bw_compute_timer_try_stop(struct wlan_objmgr_psoc *psoc);
688 
689 /**
690  * ucfg_dp_bus_bw_compute_prev_txrx_stats() - get tx and rx stats
691  * @vdev: vdev handle
692  *
693  * This function get the collected tx and rx stats before starting
694  * the bus bandwidth timer.
695  *
696  * Return: None
697  */
698 void ucfg_dp_bus_bw_compute_prev_txrx_stats(struct wlan_objmgr_vdev *vdev);
699 
700 /**
701  * ucfg_dp_bus_bw_compute_reset_prev_txrx_stats() - reset previous txrx stats
702  * @vdev: vdev handle
703  *
704  * This function resets the adapter previous tx rx stats.
705  *
706  * Return: None
707  */
708 void
709 ucfg_dp_bus_bw_compute_reset_prev_txrx_stats(struct wlan_objmgr_vdev *vdev);
710 
711 /**
712  * ucfg_dp_nud_set_gateway_addr() - set gateway mac address
713  * @vdev: vdev handle
714  * @gw_mac_addr: mac address to be set
715  *
716  * Return: none
717  */
718 void ucfg_dp_nud_set_gateway_addr(struct wlan_objmgr_vdev *vdev,
719 				  struct qdf_mac_addr gw_mac_addr);
720 
721 /**
722  * ucfg_dp_nud_event() - netevent callback
723  * @netdev_mac_addr: netdev MAC addr
724  * @gw_mac_addr: Gateway MAC address
725  * @nud_state : NUD State
726  *
727  * Return: None
728  */
729 void ucfg_dp_nud_event(struct qdf_mac_addr *netdev_mac_addr,
730 		       struct qdf_mac_addr *gw_mac_addr,
731 		       uint8_t nud_state);
732 
733 /**
734  * ucfg_dp_get_arp_stats_event_handler - ARP get stats event handler
735  *
736  * @psoc: PSOC Handle
737  * @rsp : response message
738  *
739  * Return : 0 on success else error code.
740  */
741 
742 QDF_STATUS ucfg_dp_get_arp_stats_event_handler(struct wlan_objmgr_psoc *psoc,
743 					       struct dp_rsp_stats *rsp);
744 
745 /**
746  * ucfg_dp_get_arp_request_ctx - Get ARP request context
747  *
748  * @psoc: PSOC Handle
749  *
750  * Return : ARP request context
751  */
752 void *ucfg_dp_get_arp_request_ctx(struct wlan_objmgr_psoc *psoc);
753 
754 /**
755  * ucfg_dp_nud_reset_tracking() - reset NUD tracking
756  * @vdev: vdev handle
757  *
758  * Return: None
759  */
760 void ucfg_dp_nud_reset_tracking(struct wlan_objmgr_vdev *vdev);
761 
762 /**
763  * ucfg_dp_nud_tracking_enabled - Check if NUD tracking is enabled
764  *
765  * @psoc: PSOC Handle
766  *
767  * Return : NUD tracking value.
768  */
769 uint8_t ucfg_dp_nud_tracking_enabled(struct wlan_objmgr_psoc *psoc);
770 
771 /**
772  * ucfg_dp_nud_indicate_roam() - reset NUD when roaming happens
773  * @vdev: vdev handle
774  *
775  * Return: None
776  */
777 void ucfg_dp_nud_indicate_roam(struct wlan_objmgr_vdev *vdev);
778 
779 /**
780  * ucfg_dp_clear_arp_stats() - Clear ARP Stats
781  * @vdev: vdev context
782  *
783  * Return: None
784  */
785 void ucfg_dp_clear_arp_stats(struct wlan_objmgr_vdev *vdev);
786 
787 /**
788  * ucfg_dp_clear_dns_stats() - Clear DNS Stats
789  * @vdev: vdev context
790  *
791  * Return: None
792  */
793 void ucfg_dp_clear_dns_stats(struct wlan_objmgr_vdev *vdev);
794 
795 /**
796  * ucfg_dp_clear_tcp_stats() - Clear TCP Stats
797  * @vdev: vdev context
798  *
799  * Return: None
800  */
801 void ucfg_dp_clear_tcp_stats(struct wlan_objmgr_vdev *vdev);
802 
803 /**
804  * ucfg_dp_clear_icmpv4_stats() - Clear ICMPv4 Stats
805  * @vdev: vdev context
806  *
807  * Return: None
808  */
809 void ucfg_dp_clear_icmpv4_stats(struct wlan_objmgr_vdev *vdev);
810 
811 /**
812  * ucfg_dp_clear_dns_payload_value() - Clear DNS payload value
813  * @vdev: vdev context
814  *
815  * Return: None
816  */
817 void ucfg_dp_clear_dns_payload_value(struct wlan_objmgr_vdev *vdev);
818 
819 /**
820  * ucfg_dp_set_pkt_type_bitmap_value() - Set Packet type bitmap value
821  * @vdev: vdev context
822  * @value: bitmap value
823  *
824  * Return: None
825  */
826 void ucfg_dp_set_pkt_type_bitmap_value(struct wlan_objmgr_vdev *vdev,
827 				       uint32_t value);
828 
829 /**
830  * ucfg_dp_intf_get_pkt_type_bitmap_value() - Get packt type bitmap info
831  * @intf_ctx: DP interface context
832  *
833  * Return: bitmap information
834  */
835 uint32_t ucfg_dp_intf_get_pkt_type_bitmap_value(void *intf_ctx);
836 
837 /**
838  * ucfg_dp_set_track_dest_ipv4_value() - Set track_dest_ipv4 value
839  * @vdev: vdev context
840  * @value: dest ipv4 value
841  *
842  * Return: None
843  */
844 void ucfg_dp_set_track_dest_ipv4_value(struct wlan_objmgr_vdev *vdev,
845 				       uint32_t value);
846 
847 /**
848  * ucfg_dp_set_track_dest_port_value() - Set track_dest_port value
849  * @vdev: vdev context
850  * @value: dest port value
851  *
852  * Return: None
853  */
854 void ucfg_dp_set_track_dest_port_value(struct wlan_objmgr_vdev *vdev,
855 				       uint32_t value);
856 
857 /**
858  * ucfg_dp_set_track_src_port_value() - Set track_dest_port value
859  * @vdev: vdev context
860  * @value: src port value
861  *
862  * Return: None
863  */
864 void ucfg_dp_set_track_src_port_value(struct wlan_objmgr_vdev *vdev,
865 				      uint32_t value);
866 
867 /**
868  * ucfg_dp_set_track_dns_domain_len_value() - Set track_dns_domain_len value
869  * @vdev: vdev context
870  * @value: dns domain len value
871  *
872  * Return: None
873  */
874 void ucfg_dp_set_track_dns_domain_len_value(struct wlan_objmgr_vdev *vdev,
875 					    uint32_t value);
876 
877 /**
878  * ucfg_dp_set_track_arp_ip_value() - Set track_arp_ip value
879  * @vdev: vdev context
880  * @value: ARP IP value
881  *
882  * Return: None
883  */
884 void ucfg_dp_set_track_arp_ip_value(struct wlan_objmgr_vdev *vdev,
885 				    uint32_t value);
886 
887 /**
888  * ucfg_dp_get_pkt_type_bitmap_value() - Get pkt_type_bitmap value
889  * @vdev: vdev context
890  *
891  * Return: pkt_type_bitmap value
892  */
893 uint32_t ucfg_dp_get_pkt_type_bitmap_value(struct wlan_objmgr_vdev *vdev);
894 
895 /**
896  * ucfg_dp_get_dns_payload_value() - Get dns_payload value
897  * @vdev: vdev context
898  * @dns_query : DNS query pointer
899  *
900  * Return: None
901  */
902 void ucfg_dp_get_dns_payload_value(struct wlan_objmgr_vdev *vdev,
903 				   uint8_t *dns_query);
904 
905 /**
906  * ucfg_dp_get_track_dns_domain_len_value() - Get track_dns_domain_len value
907  * @vdev: vdev context
908  *
909  * Return: track_dns_domain_len value
910  */
911 uint32_t ucfg_dp_get_track_dns_domain_len_value(struct wlan_objmgr_vdev *vdev);
912 
913 /**
914  * ucfg_dp_get_track_dest_port_value() - Get track_dest_port value
915  * @vdev: vdev context
916  *
917  * Return: track_dest_port value
918  */
919 uint32_t ucfg_dp_get_track_dest_port_value(struct wlan_objmgr_vdev *vdev);
920 
921 /**
922  * ucfg_dp_get_track_src_port_value() - Get track_src_port value
923  * @vdev: vdev context
924  *
925  * Return: track_src_port value
926  */
927 uint32_t ucfg_dp_get_track_src_port_value(struct wlan_objmgr_vdev *vdev);
928 
929 /**
930  * ucfg_dp_get_track_dest_ipv4_value() - Get track_dest_ipv4 value
931  * @vdev: vdev context
932  *
933  * Return: track_dest_ipv4 value
934  */
935 uint32_t ucfg_dp_get_track_dest_ipv4_value(struct wlan_objmgr_vdev *vdev);
936 
937 /**
938  * ucfg_dp_get_dad_value() - Get dad value
939  * @vdev: vdev context
940  *
941  * Return: dad value
942  */
943 bool ucfg_dp_get_dad_value(struct wlan_objmgr_vdev *vdev);
944 
945 /**
946  * ucfg_dp_get_con_status_value() - Get con_status value
947  * @vdev: vdev context
948  *
949  * Return: con_status value
950  */
951 bool ucfg_dp_get_con_status_value(struct wlan_objmgr_vdev *vdev);
952 
953 /**
954  * ucfg_dp_get_link_id() - Get link_id
955  * @vdev: vdev context
956  *
957  * Return: link_id
958  */
959 uint8_t ucfg_dp_get_link_id(struct wlan_objmgr_vdev *vdev);
960 
961 /**
962  * ucfg_dp_get_arp_stats() - Get ARP stats
963  * @vdev: vdev context
964  *
965  * Return: ARP Stats
966  */
967 struct dp_arp_stats *ucfg_dp_get_arp_stats(struct wlan_objmgr_vdev *vdev);
968 
969 /**
970  * ucfg_dp_get_icmpv4_stats() - Get ICMPv4 stats
971  * @vdev: vdev context
972  *
973  * Return: ICMPv4 Stats
974  */
975 struct dp_icmpv4_stats
976 *ucfg_dp_get_icmpv4_stats(struct wlan_objmgr_vdev *vdev);
977 
978 /**
979  * ucfg_dp_get_tcp_stats() - Get TCP stats
980  * @vdev: vdev context
981  *
982  * Return: TCP Stats
983  */
984 struct dp_tcp_stats *ucfg_dp_get_tcp_stats(struct wlan_objmgr_vdev *vdev);
985 
986 /**
987  * ucfg_dp_get_dns_stats() - Get DNS stats
988  * @vdev: vdev context
989  *
990  * Return: DNS Stats
991  */
992 struct dp_dns_stats *ucfg_dp_get_dns_stats(struct wlan_objmgr_vdev *vdev);
993 
994 /**
995  * ucfg_dp_set_nud_stats_cb() - Register callback with WMI
996  * @psoc: psoc context
997  * @cookie: callback context
998  *
999  * Return: None
1000  */
1001 
1002 void ucfg_dp_set_nud_stats_cb(struct wlan_objmgr_psoc *psoc, void *cookie);
1003 
1004 /**
1005  * ucfg_dp_clear_nud_stats_cb() - Unregister callback with WMI
1006  * @psoc: psoc context
1007  *
1008  * Return: None
1009  */
1010 void ucfg_dp_clear_nud_stats_cb(struct wlan_objmgr_psoc *psoc);
1011 
1012 /**
1013  * ucfg_dp_set_dump_dp_trace() - set DP Trace
1014  * @cmd_type : command
1015  * @count : Number of lines to dump
1016  *
1017  * Return: None
1018  */
1019 void ucfg_dp_set_dump_dp_trace(uint16_t cmd_type, uint16_t count);
1020 
1021 /**
1022  * ucfg_dp_req_get_arp_stats() - Send Get ARP set request to FW
1023  * @psoc: psoc context
1024  * @params : Get ARP stats param
1025  *
1026  * Return: Status
1027  */
1028 QDF_STATUS
1029 ucfg_dp_req_get_arp_stats(struct wlan_objmgr_psoc *psoc,
1030 			  struct dp_get_arp_stats_params *params);
1031 
1032 /**
1033  * ucfg_dp_req_set_arp_stats() - Send Set ARP set request to FW
1034  * @psoc: psoc context
1035  * @params : Set ARP stats param
1036  *
1037  * Return: Status
1038  */
1039 QDF_STATUS
1040 ucfg_dp_req_set_arp_stats(struct wlan_objmgr_psoc *psoc,
1041 			  struct dp_set_arp_stats_params *params);
1042 
1043 /**
1044  * ucfg_dp_register_hdd_callbacks() - Resiter HDD callbacks with DP component
1045  * @psoc: psoc handle
1046  * @cb_obj: Callback object
1047  *
1048  * Returns: None
1049  */
1050 void ucfg_dp_register_hdd_callbacks(struct wlan_objmgr_psoc *psoc,
1051 				    struct wlan_dp_psoc_callbacks *cb_obj);
1052 
1053 /**
1054  * ucfg_dp_register_event_handler() - Resiter event handler with DP component
1055  * @psoc: psoc handle
1056  * @cb_obj: Callback object
1057  *
1058  * Returns: None
1059  */
1060 void ucfg_dp_register_event_handler(struct wlan_objmgr_psoc *psoc,
1061 				    struct wlan_dp_psoc_nb_ops *cb_obj);
1062 
1063 /**
1064  * ucfg_dp_get_bus_bw_compute_interval() - Get bus bandwidth compute interval
1065  * @psoc: psoc handle
1066  *
1067  * Returns: Bus bandwidth compute interval
1068  */
1069 uint32_t ucfg_dp_get_bus_bw_compute_interval(struct wlan_objmgr_psoc *psoc);
1070 
1071 /**
1072  * ucfg_dp_get_current_throughput_level() - get current bandwidth level
1073  * @psoc: psoc handle
1074  *
1075  * Return: current bandwidth level
1076  */
1077 int ucfg_dp_get_current_throughput_level(struct wlan_objmgr_psoc *psoc);
1078 
1079 /**
1080  * ucfg_dp_get_txrx_stats() - get dp txrx stats
1081  * @vdev: vdev handle
1082  * @dp_stats : dp_stats pointer
1083  *
1084  * This function update dp_stats pointer with DP component
1085  * txrx stats
1086  * Return: 0 on success
1087  */
1088 QDF_STATUS ucfg_dp_get_txrx_stats(struct wlan_objmgr_vdev *vdev,
1089 				  struct dp_tx_rx_stats *dp_stats);
1090 
1091 /*
1092  * ucfg_dp_get_net_dev_stats(): Get netdev stats
1093  * @vdev: vdev handle
1094  * @stats: To hold netdev stats
1095  *
1096  * Return: None
1097  */
1098 void ucfg_dp_get_net_dev_stats(struct wlan_objmgr_vdev *vdev,
1099 			       qdf_net_dev_stats *stats);
1100 
1101 /*
1102  * ucfg_dp_clear_net_dev_stats(): Clear netdev stats
1103  * @dev: Pointer to netdev
1104  *
1105  * Return: None
1106  */
1107 void ucfg_dp_clear_net_dev_stats(qdf_netdev_t dev);
1108 
1109 /**
1110  * ucfg_dp_reset_cont_txtimeout_cnt() - Reset Tx Timeout count
1111  * @vdev: vdev handle
1112  *
1113  * Return: None
1114  */
1115 void ucfg_dp_reset_cont_txtimeout_cnt(struct wlan_objmgr_vdev *vdev);
1116 
1117 /**
1118  * ucfg_dp_set_rx_thread_affinity() - Set rx thread affinity mask
1119  * @psoc: psoc handle
1120  *
1121  * Return: None
1122  */
1123 void ucfg_dp_set_rx_thread_affinity(struct wlan_objmgr_psoc *psoc);
1124 
1125 /**
1126  * ucfg_dp_get_disable_rx_ol_val() - Get Rx OL concurrency value
1127  * @psoc: psoc handle
1128  * @disable_conc : disable rx OL concurrency value
1129  * @disable_low_tput : disable rx OL low tput value
1130  *
1131  * this function reads and update value in pointer variable
1132  * passed as arguments to function.
1133  *
1134  * Return: None
1135  */
1136 
1137 void ucfg_dp_get_disable_rx_ol_val(struct wlan_objmgr_psoc *psoc,
1138 				   uint8_t *disable_conc,
1139 				   uint8_t *disable_low_tput);
1140 
1141 /**
1142  * ucfg_dp_get_rx_aggregation_val() - Get Rx aggregation values
1143  * @psoc: psoc handle
1144  *
1145  * Return: Rx aggregation value
1146  */
1147 uint32_t ucfg_dp_get_rx_aggregation_val(struct wlan_objmgr_psoc *psoc);
1148 
1149 /**
1150  * ucfg_dp_set_rx_aggregation_val() - Set rx aggregation value
1151  * @psoc: psoc handle
1152  * @value : value to be set
1153  *
1154  * Return: None
1155  */
1156 void ucfg_dp_set_rx_aggregation_val(struct wlan_objmgr_psoc *psoc,
1157 				    uint32_t value);
1158 
1159 /**
1160  * ucfg_dp_set_tc_based_dyn_gro() - Set tc based dynamic gro
1161  * @psoc: psoc handle
1162  * @value : value to be set
1163  *
1164  * Return: None
1165  */
1166 void ucfg_dp_set_tc_based_dyn_gro(struct wlan_objmgr_psoc *psoc, bool value);
1167 
1168 /**
1169  * ucfg_dp_runtime_disable_rx_thread() - Disable rx thread
1170  * @vdev: vdev handle
1171  * @value : value to be set (true/false)
1172  *
1173  * Return: None
1174  */
1175 void ucfg_dp_runtime_disable_rx_thread(struct wlan_objmgr_vdev *vdev,
1176 				       bool value);
1177 
1178 /**
1179  * ucfg_dp_get_napi_enabled() - Get NAPI enabled/disabled info
1180  * @psoc: psoc handle mapped to DP context
1181  *
1182  * Return: true if NAPI enabled
1183  */
1184 bool ucfg_dp_get_napi_enabled(struct wlan_objmgr_psoc *psoc);
1185 
1186 /**
1187  * ucfg_dp_set_tc_ingress_prio() - Set tc ingress priority
1188  * @psoc: psoc handle mapped to DP context
1189  * @value: value to be set
1190  *
1191  * Return: None
1192  */
1193 void ucfg_dp_set_tc_ingress_prio(struct wlan_objmgr_psoc *psoc, uint32_t value);
1194 
1195 /**
1196  * ucfg_dp_nud_fail_data_stall_evt_enabled() - Check if NUD failuire data stall
1197  * detection is enabled
1198  *
1199  * Return: True if the data stall event is enabled
1200  */
1201 bool ucfg_dp_nud_fail_data_stall_evt_enabled(void);
1202 
1203 /**
1204  * ucfg_dp_fw_data_stall_evt_enabled() - Check if Fw data stall
1205  * detection is enabled
1206  *
1207  * Return: data stall event mask
1208  */
1209 uint32_t ucfg_dp_fw_data_stall_evt_enabled(void);
1210 
1211 /**
1212  * ucfg_dp_get_bus_bw_high_threshold() - Get the bus bw high threshold
1213  * @psoc: psoc handle
1214  *
1215  * Return: current bus bw high threshold
1216  */
1217 uint32_t ucfg_dp_get_bus_bw_high_threshold(struct wlan_objmgr_psoc *psoc);
1218 
1219 /**
1220  * ucfg_dp_event_eapol_log() - send event to wlan diag
1221  * @nbuf: Network buffer ptr
1222  * @dir: direction
1223  *
1224  * Return: None
1225  */
1226 void ucfg_dp_event_eapol_log(qdf_nbuf_t nbuf, enum qdf_proto_dir dir);
1227 
1228 /**
1229  * ucfg_dp_softap_inspect_dhcp_packet() - Inspect DHCP packet
1230  * @vdev: Vdev handle
1231  * @nbuf: pointer to network buffer
1232  * @dir: direction
1233  *
1234  * Inspect the Tx/Rx frame, and send DHCP START/STOP notification to the FW
1235  * through WMI message, during DHCP based IP address acquisition phase.
1236  *
1237  * Return: error number
1238  */
1239 QDF_STATUS
1240 ucfg_dp_softap_inspect_dhcp_packet(struct wlan_objmgr_vdev *vdev,
1241 				   qdf_nbuf_t nbuf, enum qdf_proto_dir dir);
1242 
1243 void
1244 dp_ucfg_enable_link_monitoring(struct wlan_objmgr_psoc *psoc,
1245 			       struct wlan_objmgr_vdev *vdev,
1246 			       uint32_t threshold);
1247 
1248 void
1249 dp_ucfg_disable_link_monitoring(struct wlan_objmgr_psoc *psoc,
1250 				struct wlan_objmgr_vdev *vdev);
1251 
1252 #if defined(WLAN_SUPPORT_RX_FISA)
1253 /**
1254  * ucfg_dp_rx_skip_fisa() - Set flags to skip fisa aggregation
1255  * @value: allow or skip fisa
1256  *
1257  * Return: None
1258  */
1259 void ucfg_dp_rx_skip_fisa(uint32_t value);
1260 
1261 #else
1262 static inline
ucfg_dp_rx_skip_fisa(uint32_t value)1263 void ucfg_dp_rx_skip_fisa(uint32_t value)
1264 {
1265 }
1266 #endif
1267 
1268 #ifdef DP_TRAFFIC_END_INDICATION
1269 /**
1270  * ucfg_dp_traffic_end_indication_get() - Get data end indication info
1271  * @vdev: vdev handle
1272  * @info: variable to hold stored data end indication info
1273  *
1274  * Return: QDF_STATUS
1275  */
1276 QDF_STATUS
1277 ucfg_dp_traffic_end_indication_get(struct wlan_objmgr_vdev *vdev,
1278 				   struct dp_traffic_end_indication *info);
1279 /**
1280  * ucfg_dp_traffic_end_indication_set() - Store data end indication info
1281  * @vdev: vdev handle
1282  * @info: variable holding new data end indication info
1283  *
1284  * Return: QDF_STATUS
1285  */
1286 QDF_STATUS
1287 ucfg_dp_traffic_end_indication_set(struct wlan_objmgr_vdev *vdev,
1288 				   struct dp_traffic_end_indication info);
1289 /**
1290  * ucfg_dp_traffic_end_indication_update_dscp() - update dscp value to default
1291  * @psoc: psoc handle
1292  * @vdev_id: vdev id
1293  * @dscp: dscp value to be updated
1294  *
1295  * Return: void
1296  */
1297 void
1298 ucfg_dp_traffic_end_indication_update_dscp(struct wlan_objmgr_psoc *psoc,
1299 					   uint8_t vdev_id,
1300 					   unsigned char *dscp);
1301 #else
1302 static inline QDF_STATUS
ucfg_dp_traffic_end_indication_get(struct wlan_objmgr_vdev * vdev,struct dp_traffic_end_indication * info)1303 ucfg_dp_traffic_end_indication_get(struct wlan_objmgr_vdev *vdev,
1304 				   struct dp_traffic_end_indication *info)
1305 {
1306 	return QDF_STATUS_SUCCESS;
1307 }
1308 
1309 static inline QDF_STATUS
ucfg_dp_traffic_end_indication_set(struct wlan_objmgr_vdev * vdev,struct dp_traffic_end_indication info)1310 ucfg_dp_traffic_end_indication_set(struct wlan_objmgr_vdev *vdev,
1311 				   struct dp_traffic_end_indication info)
1312 {
1313 	return QDF_STATUS_SUCCESS;
1314 }
1315 
1316 static inline void
ucfg_dp_traffic_end_indication_update_dscp(struct wlan_objmgr_psoc * psoc,uint8_t vdev_id,unsigned char * dscp)1317 ucfg_dp_traffic_end_indication_update_dscp(struct wlan_objmgr_psoc *psoc,
1318 					   uint8_t vdev_id,
1319 					   unsigned char *dscp)
1320 {}
1321 #endif
1322 
1323 /*
1324  * ucfg_dp_prealloc_init() - Pre-allocate DP memory
1325  * @ctrl_psoc: objmgr psoc
1326  *
1327  * Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
1328  */
1329 QDF_STATUS ucfg_dp_prealloc_init(struct cdp_ctrl_objmgr_psoc *ctrl_psoc);
1330 
1331 /*
1332  * ucfg_dp_prealloc_deinit() - Free pre-alloced DP memory
1333  *
1334  * Return: None
1335  */
1336 void ucfg_dp_prealloc_deinit(void);
1337 
1338 #ifdef DP_MEM_PRE_ALLOC
1339 /**
1340  * ucfg_dp_prealloc_get_consistent_mem_unaligned() - gets pre-alloc unaligned
1341  *						     consistent memory
1342  * @size: total memory size
1343  * @base_addr: pointer to dma address
1344  * @ring_type: HAL ring type that requires memory
1345  *
1346  * Return: memory virtual address pointer on success, NULL on failure
1347  */
1348 void *ucfg_dp_prealloc_get_consistent_mem_unaligned(qdf_size_t size,
1349 						    qdf_dma_addr_t *base_addr,
1350 						    uint32_t ring_type);
1351 
1352 /**
1353  * ucfg_dp_prealloc_put_consistent_mem_unaligned() - puts back pre-alloc
1354  * unaligned consistent memory
1355  * @va_unaligned: memory virtual address pointer
1356  *
1357  * Return: None
1358  */
1359 void ucfg_dp_prealloc_put_consistent_mem_unaligned(void *va_unaligned);
1360 
1361 /**
1362  * ucfg_dp_prealloc_get_multi_pages() - gets pre-alloc DP multi-pages memory
1363  * @desc_type: descriptor type
1364  * @elem_size: single element size
1365  * @elem_num: total number of elements should be allocated
1366  * @pages: multi page information storage
1367  * @cacheable: coherent memory or cacheable memory
1368  *
1369  * Return: None
1370  */
1371 void ucfg_dp_prealloc_get_multi_pages(uint32_t desc_type, qdf_size_t elem_size,
1372 				      uint16_t elem_num,
1373 				      struct qdf_mem_multi_page_t *pages,
1374 				      bool cacheable);
1375 
1376 /**
1377  * ucfg_dp_prealloc_put_multi_pages() - puts back pre-alloc DP multi-pages
1378  *  memory
1379  * @desc_type: descriptor type
1380  * @pages: multi page information storage
1381  *
1382  * Return: None
1383  */
1384 void ucfg_dp_prealloc_put_multi_pages(uint32_t desc_type,
1385 				      struct qdf_mem_multi_page_t *pages);
1386 #endif
1387 
1388 #ifdef FEATURE_DIRECT_LINK
1389 /**
1390  * ucfg_dp_direct_link_init() - Initializes Direct Link datapath
1391  * @psoc: psoc handle
1392  *
1393  * Return: QDF status
1394  */
1395 QDF_STATUS ucfg_dp_direct_link_init(struct wlan_objmgr_psoc *psoc);
1396 
1397 /**
1398  * ucfg_dp_direct_link_deinit() - De-initializes Direct Link datapath
1399  * @psoc: psoc handle
1400  * @is_ssr: true if SSR is in progress else false
1401  *
1402  * Return: None
1403  */
1404 void ucfg_dp_direct_link_deinit(struct wlan_objmgr_psoc *psoc, bool is_ssr);
1405 
1406 /**
1407  * ucfg_dp_wfds_handle_request_mem_ind() - Process request memory indication
1408  *  received from QMI server
1409  * @mem_msg: pointer to memory request indication message
1410  *
1411  * Return: None
1412  */
1413 void
1414 ucfg_dp_wfds_handle_request_mem_ind(struct wlan_qmi_wfds_mem_ind_msg *mem_msg);
1415 
1416 /**
1417  * ucfg_dp_wfds_handle_ipcc_map_n_cfg_ind() - Process IPCC map and configure
1418  *  indication received from QMI server
1419  * @ipcc_msg: pointer to IPCC map and configure indication message
1420  *
1421  * Return: None
1422  */
1423 void
1424 ucfg_dp_wfds_handle_ipcc_map_n_cfg_ind(struct wlan_qmi_wfds_ipcc_map_n_cfg_ind_msg *ipcc_msg);
1425 
1426 /**
1427  * ucfg_dp_wfds_new_server() - New server callback triggered when service is up.
1428  *  Connect to the service as part of this call.
1429  *
1430  * Return: QDF status
1431  */
1432 QDF_STATUS ucfg_dp_wfds_new_server(void);
1433 
1434 /**
1435  * ucfg_dp_wfds_del_server() - Del server callback triggered when service is
1436  *  down.
1437  *
1438  * Return: None
1439  */
1440 void ucfg_dp_wfds_del_server(void);
1441 
1442 /**
1443  * ucfg_dp_config_direct_link() - Set direct link config for vdev
1444  * @dev: netdev
1445  * @config_direct_link: Flag to enable direct link path
1446  * @enable_low_latency: Flag to enable low link latency
1447  *
1448  * Return: QDF Status
1449  */
1450 QDF_STATUS ucfg_dp_config_direct_link(qdf_netdev_t dev,
1451 				      bool config_direct_link,
1452 				      bool enable_low_latency);
1453 #else
1454 static inline
ucfg_dp_direct_link_init(struct wlan_objmgr_psoc * psoc)1455 QDF_STATUS ucfg_dp_direct_link_init(struct wlan_objmgr_psoc *psoc)
1456 {
1457 	return QDF_STATUS_SUCCESS;
1458 }
1459 
1460 static inline
ucfg_dp_direct_link_deinit(struct wlan_objmgr_psoc * psoc,bool is_ssr)1461 void ucfg_dp_direct_link_deinit(struct wlan_objmgr_psoc *psoc, bool is_ssr)
1462 {
1463 }
1464 
1465 #ifdef QMI_WFDS
1466 static inline void
ucfg_dp_wfds_handle_request_mem_ind(struct wlan_qmi_wfds_mem_ind_msg * mem_msg)1467 ucfg_dp_wfds_handle_request_mem_ind(struct wlan_qmi_wfds_mem_ind_msg *mem_msg)
1468 {
1469 }
1470 
1471 static inline void
ucfg_dp_wfds_handle_ipcc_map_n_cfg_ind(struct wlan_qmi_wfds_ipcc_map_n_cfg_ind_msg * ipcc_msg)1472 ucfg_dp_wfds_handle_ipcc_map_n_cfg_ind(struct wlan_qmi_wfds_ipcc_map_n_cfg_ind_msg *ipcc_msg)
1473 {
1474 }
1475 
ucfg_dp_wfds_new_server(void)1476 static inline QDF_STATUS ucfg_dp_wfds_new_server(void)
1477 {
1478 	return QDF_STATUS_SUCCESS;
1479 }
1480 
ucfg_dp_wfds_del_server(void)1481 static inline void ucfg_dp_wfds_del_server(void)
1482 {
1483 }
1484 #endif
1485 
1486 static inline
ucfg_dp_config_direct_link(qdf_netdev_t dev,bool config_direct_link,bool enable_low_latency)1487 QDF_STATUS ucfg_dp_config_direct_link(qdf_netdev_t dev,
1488 				      bool config_direct_link,
1489 				      bool enable_low_latency)
1490 {
1491 	return QDF_STATUS_SUCCESS;
1492 }
1493 #endif
1494 
1495 /**
1496  * ucfg_dp_bus_suspend() - BUS suspend DP handler
1497  * @soc: CDP SoC handle
1498  * @pdev_id: DP PDEV ID
1499  *
1500  * Return: QDF_STATUS
1501  */
1502 QDF_STATUS ucfg_dp_bus_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id);
1503 
1504 /**
1505  * ucfg_dp_bus_resume() - BUS resume DP handler
1506  * @soc: CDP SoC handle
1507  * @pdev_id: DP PDEV ID
1508  *
1509  * Return: QDF_STATUS
1510  */
1511 QDF_STATUS ucfg_dp_bus_resume(ol_txrx_soc_handle soc, uint8_t pdev_id);
1512 
1513 /**
1514  * ucfg_dp_txrx_soc_attach() - Datapath soc attach
1515  * @params: SoC attach params
1516  * @is_wifi3_0_target: [OUT] Pointer to update if the target is wifi3.0
1517  *
1518  * Return: SoC handle
1519  */
1520 void *ucfg_dp_txrx_soc_attach(struct dp_txrx_soc_attach_params *params,
1521 			      bool *is_wifi3_0_target);
1522 
1523 /**
1524  * ucfg_dp_txrx_soc_detach() - Datapath SoC detach
1525  * @soc: DP SoC handle
1526  *
1527  * Return: None
1528  */
1529 void ucfg_dp_txrx_soc_detach(ol_txrx_soc_handle soc);
1530 
1531 /**
1532  * ucfg_dp_txrx_attach_target() - DP target attach
1533  * @soc: DP SoC handle
1534  * @pdev_id: DP pdev id
1535  *
1536  * Return: QDF_STATUS
1537  */
1538 QDF_STATUS ucfg_dp_txrx_attach_target(ol_txrx_soc_handle soc, uint8_t pdev_id);
1539 
1540 /**
1541  * ucfg_dp_txrx_pdev_attach() - DP pdev attach
1542  * @soc: DP SoC handle
1543  *
1544  * Return: QDF_STATUS
1545  */
1546 QDF_STATUS ucfg_dp_txrx_pdev_attach(ol_txrx_soc_handle soc);
1547 
1548 /**
1549  * ucfg_dp_txrx_pdev_detach() - DP pdev detach
1550  * @soc: DP SoC handle
1551  * @pdev_id: DP pdev id
1552  * @force: indicates if force detach is to be done or not
1553  *
1554  * Return: QDF_STATUS
1555  */
1556 QDF_STATUS ucfg_dp_txrx_pdev_detach(ol_txrx_soc_handle soc, uint8_t pdev_id,
1557 				    int force);
1558 
1559 /**
1560  * ucfg_dp_txrx_init() - initialize DP TXRX module
1561  * @soc: ol_txrx_soc_handle
1562  * @pdev_id: id of dp pdev handle
1563  * @config: configuration for DP TXRX modules
1564  *
1565  * Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
1566  */
1567 QDF_STATUS ucfg_dp_txrx_init(ol_txrx_soc_handle soc, uint8_t pdev_id,
1568 			     struct dp_txrx_config *config);
1569 
1570 /**
1571  * ucfg_dp_txrx_deinit() - de-initialize DP TXRX module
1572  * @soc: ol_txrx_soc_handle
1573  *
1574  * Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
1575  */
1576 QDF_STATUS ucfg_dp_txrx_deinit(ol_txrx_soc_handle soc);
1577 
1578 /**
1579  * ucfg_dp_txrx_ext_dump_stats() - dump txrx external module stats
1580  * @soc: ol_txrx_soc_handle object
1581  * @stats_id: id  for the module whose stats are needed
1582  *
1583  * Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
1584  */
1585 QDF_STATUS ucfg_dp_txrx_ext_dump_stats(ol_txrx_soc_handle soc,
1586 				       uint8_t stats_id);
1587 /**
1588  * ucfg_dp_txrx_set_cpu_mask() - set CPU mask for RX threads
1589  * @soc: ol_txrx_soc_handle object
1590  * @new_mask: New CPU mask pointer
1591  *
1592  * Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
1593  */
1594 QDF_STATUS ucfg_dp_txrx_set_cpu_mask(ol_txrx_soc_handle soc,
1595 				     qdf_cpu_mask *new_mask);
1596 
1597 /**
1598  * ucfg_dp_get_per_link_peer_stats() - Call to get per link peer stats
1599  * @soc: soc handle
1600  * @vdev_id: vdev_id of vdev object
1601  * @peer_mac: mac address of the peer
1602  * @peer_stats: destination buffer
1603  * @peer_type: Peer type
1604  * @num_link: Number of ML links
1605  *
1606  * NOTE: For peer_type = CDP_MLD_PEER_TYPE peer_stats should point to
1607  *			 buffer of size = (sizeof(*peer_stats) * num_link)
1608  *
1609  * Return: QDF_STATUS
1610  */
1611 QDF_STATUS
1612 ucfg_dp_get_per_link_peer_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
1613 				uint8_t *peer_mac,
1614 				struct cdp_peer_stats *peer_stats,
1615 				enum cdp_peer_type peer_type,
1616 				uint8_t num_link);
1617 
1618 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
1619 /**
1620  * ucfg_dp_is_local_pkt_capture_enabled() - Get local packet capture config
1621  * @psoc: pointer to psoc object
1622  *
1623  * Return: true if local packet capture is enabled from ini
1624  *         false otherwise
1625  */
1626 bool
1627 ucfg_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc);
1628 #else
1629 static inline bool
ucfg_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc * psoc)1630 ucfg_dp_is_local_pkt_capture_enabled(struct wlan_objmgr_psoc *psoc)
1631 {
1632 	return false;
1633 }
1634 #endif /* WLAN_FEATURE_LOCAL_PKT_CAPTURE */
1635 
1636 /**
1637  * ucfg_dp_get_vdev_stats () - API to get vdev stats
1638  * @soc: dp soc object
1639  * @vdev_id: Vdev ID of vdev for which stats is requested
1640  * @buf: Pointer to buffer in which stats need to be updated
1641  *
1642  * Return: QDF_STATUS_SUCCESS on success else error code
1643  */
1644 QDF_STATUS ucfg_dp_get_vdev_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
1645 				  struct cdp_vdev_stats *buf);
1646 
1647 /*
1648  * ucfg_dp_set_mon_conf_flags(): Set monitor configuration flags
1649  * @psoc: psoc handle
1650  * @flags: monitor configuration flags
1651  *
1652  * Return: None
1653  */
1654 void ucfg_dp_set_mon_conf_flags(struct wlan_objmgr_psoc *psoc, uint32_t flags);
1655 #endif /* _WLAN_DP_UCFG_API_H_ */
1656