xref: /wlan-driver/qca-wifi-host-cmn/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2018, 2020-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: Declare public API related to the wlan ipa called by north bound
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #ifndef _WLAN_IPA_OBJ_MGMT_H_
24*5113495bSYour Name #define _WLAN_IPA_OBJ_MGMT_H_
25*5113495bSYour Name 
26*5113495bSYour Name #include "wlan_ipa_public_struct.h"
27*5113495bSYour Name #include "wlan_objmgr_pdev_obj.h"
28*5113495bSYour Name #include "wlan_ipa_main.h"
29*5113495bSYour Name 
30*5113495bSYour Name #ifdef IPA_OFFLOAD
31*5113495bSYour Name 
32*5113495bSYour Name /**
33*5113495bSYour Name  * ipa_init() - IPA module initialization
34*5113495bSYour Name  *
35*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success
36*5113495bSYour Name  */
37*5113495bSYour Name QDF_STATUS ipa_init(void);
38*5113495bSYour Name 
39*5113495bSYour Name /**
40*5113495bSYour Name  * ipa_deinit() - IPA module deinitialization
41*5113495bSYour Name  *
42*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success
43*5113495bSYour Name  */
44*5113495bSYour Name QDF_STATUS ipa_deinit(void);
45*5113495bSYour Name 
46*5113495bSYour Name /**
47*5113495bSYour Name  * ipa_register_is_ipa_ready() - Register IPA ready callback
48*5113495bSYour Name  * @pdev: pointer to pdev
49*5113495bSYour Name  *
50*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success
51*5113495bSYour Name  */
52*5113495bSYour Name QDF_STATUS ipa_register_is_ipa_ready(struct wlan_objmgr_pdev *pdev);
53*5113495bSYour Name 
54*5113495bSYour Name /**
55*5113495bSYour Name  * ipa_disable_register_cb() - Reset the IPA is ready flag
56*5113495bSYour Name  *
57*5113495bSYour Name  * Return: Set the ipa_is_ready flag to false when module is
58*5113495bSYour Name  * unloaded to indicate that ipa ready cb is not registered
59*5113495bSYour Name  */
60*5113495bSYour Name void ipa_disable_register_cb(void);
61*5113495bSYour Name 
62*5113495bSYour Name /**
63*5113495bSYour Name  * wlan_ipa_config_is_enabled() - api to get IPA enable status
64*5113495bSYour Name  *
65*5113495bSYour Name  * Return: true - ipa is enabled
66*5113495bSYour Name  *         false - ipa is not enabled
67*5113495bSYour Name  */
wlan_ipa_config_is_enabled(void)68*5113495bSYour Name static inline bool wlan_ipa_config_is_enabled(void)
69*5113495bSYour Name {
70*5113495bSYour Name 	return ipa_config_is_enabled();
71*5113495bSYour Name }
72*5113495bSYour Name 
73*5113495bSYour Name /**
74*5113495bSYour Name  * wlan_ipa_get_hdl() - Get ipa hdl set by IPA driver
75*5113495bSYour Name  * @soc: void psoc object
76*5113495bSYour Name  * @pdev_id: pdev id
77*5113495bSYour Name  *
78*5113495bSYour Name  * Return: IPA handle
79*5113495bSYour Name  */
80*5113495bSYour Name qdf_ipa_wdi_hdl_t wlan_ipa_get_hdl(void *soc, uint8_t pdev_id);
81*5113495bSYour Name 
82*5113495bSYour Name /**
83*5113495bSYour Name  * wlan_ipa_is_vlan_enabled() - get IPA vlan support enable status
84*5113495bSYour Name  *
85*5113495bSYour Name  * Return: true - ipa vlan support is enabled
86*5113495bSYour Name  *         false - ipa vlan support is not enabled
87*5113495bSYour Name  */
88*5113495bSYour Name bool wlan_ipa_is_vlan_enabled(void);
89*5113495bSYour Name #else
90*5113495bSYour Name 
ipa_init(void)91*5113495bSYour Name static inline QDF_STATUS ipa_init(void)
92*5113495bSYour Name {
93*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
94*5113495bSYour Name }
95*5113495bSYour Name 
ipa_deinit(void)96*5113495bSYour Name static inline QDF_STATUS ipa_deinit(void)
97*5113495bSYour Name {
98*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
99*5113495bSYour Name }
100*5113495bSYour Name 
ipa_register_is_ipa_ready(struct wlan_objmgr_pdev * pdev)101*5113495bSYour Name static inline QDF_STATUS ipa_register_is_ipa_ready(
102*5113495bSYour Name 	struct wlan_objmgr_pdev *pdev)
103*5113495bSYour Name {
104*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
105*5113495bSYour Name }
106*5113495bSYour Name 
ipa_disable_register_cb(void)107*5113495bSYour Name static inline void ipa_disable_register_cb(void)
108*5113495bSYour Name {
109*5113495bSYour Name }
110*5113495bSYour Name 
ipa_config_is_opt_wifi_dp_enabled(void)111*5113495bSYour Name static inline bool ipa_config_is_opt_wifi_dp_enabled(void)
112*5113495bSYour Name {
113*5113495bSYour Name 	return false;
114*5113495bSYour Name }
115*5113495bSYour Name 
wlan_ipa_config_is_enabled(void)116*5113495bSYour Name static inline bool wlan_ipa_config_is_enabled(void)
117*5113495bSYour Name {
118*5113495bSYour Name 	return false;
119*5113495bSYour Name }
120*5113495bSYour Name 
wlan_ipa_is_vlan_enabled(void)121*5113495bSYour Name static inline bool wlan_ipa_is_vlan_enabled(void)
122*5113495bSYour Name {
123*5113495bSYour Name 	return false;
124*5113495bSYour Name }
125*5113495bSYour Name #endif /* IPA_OFFLOAD */
126*5113495bSYour Name 
127*5113495bSYour Name #endif /* _WLAN_IPA_OBJ_MGMT_H_ */
128