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.c
18 *
19 */
20
21 #include "wlan_dp_main.h"
22 #include "wlan_dp_api.h"
23 #include <wlan_dp_fisa_rx.h>
24 #include <cdp_txrx_ctrl.h>
25
wlan_dp_update_peer_map_unmap_version(uint8_t * version)26 void wlan_dp_update_peer_map_unmap_version(uint8_t *version)
27 {
28 __wlan_dp_update_peer_map_unmap_version(version);
29 }
30
wlan_dp_runtime_suspend(ol_txrx_soc_handle soc,uint8_t pdev_id)31 QDF_STATUS wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id)
32 {
33 return __wlan_dp_runtime_suspend(soc, pdev_id);
34 }
35
wlan_dp_runtime_resume(ol_txrx_soc_handle soc,uint8_t pdev_id)36 QDF_STATUS wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id)
37 {
38 return __wlan_dp_runtime_resume(soc, pdev_id);
39 }
40
wlan_dp_print_fisa_rx_stats(enum cdp_fisa_stats_id stats_id)41 void wlan_dp_print_fisa_rx_stats(enum cdp_fisa_stats_id stats_id)
42 {
43 dp_print_fisa_rx_stats(stats_id);
44 }
45
wlan_dp_set_fst_in_cmem(bool fst_in_cmem)46 void wlan_dp_set_fst_in_cmem(bool fst_in_cmem)
47 {
48 dp_set_fst_in_cmem(fst_in_cmem);
49 }
50
wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)51 void wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)
52 {
53 dp_set_fisa_dynamic_aggr_size_support(dynamic_aggr_size_support);
54 }
55
56 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc * psoc)57 bool wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc *psoc)
58 {
59 void *soc = cds_get_context(QDF_MODULE_ID_SOC);
60 union cdp_config_param_t param;
61 QDF_STATUS status;
62
63 status = cdp_txrx_get_psoc_param(soc, CDP_MONITOR_FLAG, ¶m);
64 if (QDF_IS_STATUS_ERROR(status)) {
65 dp_err("Unable to fetch monitor flags.");
66 return false;
67 }
68
69 if (cdp_cfg_get(soc, cfg_dp_local_pkt_capture) &&
70 !(QDF_MONITOR_FLAG_OTHER_BSS & param.cdp_monitor_flag))
71 return true;
72
73 return false;
74 }
75 #endif
76
wlan_dp_update_def_link(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * intf_mac,struct wlan_objmgr_vdev * vdev)77 void wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
78 struct qdf_mac_addr *intf_mac,
79 struct wlan_objmgr_vdev *vdev)
80 {
81 __wlan_dp_update_def_link(psoc, intf_mac, vdev);
82 }
83