xref: /wlan-driver/qcacld-3.0/components/qmi/dispatcher/inc/wlan_qmi_ucfg_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022 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 /**
18  * DOC: wlan_qmi_ucfg_api.h
19  *
20  * QMI component north bound interface
21  */
22 
23 #ifndef _WLAN_QMI_UCFG_API_H_
24 #define _WLAN_QMI_UCFG_API_H_
25 
26 #include <wlan_objmgr_psoc_obj.h>
27 #include <wlan_qmi_public_struct.h>
28 
29 #ifdef QMI_COMPONENT_ENABLE
30 /**
31  * ucfg_qmi_init() - API to init QMI component
32  *
33  * This API is invoked from hdd_component_init during all component init.
34  * This API will register all required handlers for psoc object
35  * create/delete notification.
36  *
37  * Return: QDF status
38  */
39 QDF_STATUS ucfg_qmi_init(void);
40 
41 /**
42  * ucfg_qmi_deinit() - API to deinit QMI component
43  *
44  * This API is invoked from hdd_component_deinit during all component deinit.
45  * This API will unregister all required handlers for psoc object
46  * create/delete notification.
47  *
48  * Return: QDF status
49  */
50 QDF_STATUS ucfg_qmi_deinit(void);
51 
52 /**
53  * ucfg_qmi_register_os_if_callbacks() - API to register os if callbacks with
54  *  QMI component
55  * @psoc: PSOC handle
56  * @cb_obj: callback object
57  *
58  * Return: None
59  */
60 void ucfg_qmi_register_os_if_callbacks(struct wlan_objmgr_psoc *psoc,
61 				       struct wlan_qmi_psoc_callbacks *cb_obj);
62 #else
ucfg_qmi_init(void)63 static inline QDF_STATUS ucfg_qmi_init(void)
64 {
65 	return QDF_STATUS_SUCCESS;
66 }
67 
ucfg_qmi_deinit(void)68 static inline QDF_STATUS ucfg_qmi_deinit(void)
69 {
70 	return QDF_STATUS_SUCCESS;
71 }
72 
73 static inline
ucfg_qmi_register_os_if_callbacks(struct wlan_objmgr_psoc * psoc,struct wlan_qmi_psoc_callbacks * cb_obj)74 void ucfg_qmi_register_os_if_callbacks(struct wlan_objmgr_psoc *psoc,
75 				       struct wlan_qmi_psoc_callbacks *cb_obj)
76 {
77 }
78 #endif
79 #endif
80