1 /*
2 * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16 /**
17 * DOC: wlan_dp_api.h
18 *
19 */
20
21 #if !defined(_WLAN_DP_API_H_)
22 #define _WLAN_DP_API_H_
23
24 #include <cdp_txrx_cmn_struct.h>
25
26 /**
27 * wlan_dp_update_peer_map_unmap_version() - update peer map unmap version
28 * @version: Peer map unmap version pointer to be updated
29 *
30 * Return: None
31 */
32 void wlan_dp_update_peer_map_unmap_version(uint8_t *version);
33
34 /**
35 * wlan_dp_runtime_suspend() - Runtime suspend DP handler
36 * @soc: CDP SoC handle
37 * @pdev_id: DP PDEV ID
38 *
39 * Return: QDF_STATUS
40 */
41 QDF_STATUS wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id);
42
43 /**
44 * wlan_dp_runtime_resume() - Runtime suspend DP handler
45 * @soc: CDP SoC handle
46 * @pdev_id: DP PDEV ID
47 *
48 * Return: QDF_STATUS
49 */
50 QDF_STATUS wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id);
51
52 /**
53 * wlan_dp_print_fisa_rx_stats() - Dump fisa stats
54 * @stats_id: ID for the stats to be dumped
55 *
56 * Return: None
57 */
58 void wlan_dp_print_fisa_rx_stats(enum cdp_fisa_stats_id stats_id);
59
60 /**
61 * wlan_dp_set_fst_in_cmem() - Set flag to indicate FST is in CMEM
62 * @fst_in_cmem: Flag to indicate FST is in CMEM
63 *
64 * Return: None
65 */
66 void wlan_dp_set_fst_in_cmem(bool fst_in_cmem);
67
68 /**
69 * wlan_dp_set_fisa_dynamic_aggr_size_support - Set flag to indicate dynamic
70 * MSDU aggregation size programming supported
71 * @dynamic_aggr_size_support: Flag to indicate dynamic aggregation size support
72 *
73 * Return: None
74 */
75 void wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support);
76
77 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
78 /**
79 * wlan_dp_is_local_pkt_capture_active() - Get local packet capture config
80 * @psoc: pointer to psoc object
81 *
82 * Return: true if local packet capture is active, false otherwise
83 */
84 bool
85 wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc *psoc);
86 #else
87 static inline bool
wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc * psoc)88 wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc *psoc)
89 {
90 return false;
91 }
92 #endif /* WLAN_FEATURE_LOCAL_PKT_CAPTURE */
93
94 /**
95 * wlan_dp_update_def_link() - update DP interface default link
96 * @psoc: psoc handle
97 * @intf_mac: interface MAC address
98 * @vdev: objmgr vdev handle to set the def_link in dp_intf
99 *
100 */
101 void wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
102 struct qdf_mac_addr *intf_mac,
103 struct wlan_objmgr_vdev *vdev);
104 #endif
105