xref: /wlan-driver/qcacld-3.0/components/qmi/core/inc/wlan_qmi_main.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_main.h
19  *
20  * QMI component core function declarations
21  */
22 
23 #ifndef _WLAN_QMI_MAIN_H_
24 #define _WLAN_QMI_MAIN_H_
25 
26 #include "wlan_objmgr_psoc_obj.h"
27 #include <qdf_trace.h>
28 
29 #define qmi_debug(params...) \
30 	QDF_TRACE_DEBUG(QDF_MODULE_ID_QMI, params)
31 #define qmi_debug_rl(params...) \
32 	QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_QMI, params)
33 
34 #define qmi_info(params...) \
35 	QDF_TRACE_INFO(QDF_MODULE_ID_QMI, params)
36 #define qmi_warn(params...) \
37 	QDF_TRACE_WARN(QDF_MODULE_ID_QMI, params)
38 #define qmi_err(params...) \
39 	QDF_TRACE_ERROR(QDF_MODULE_ID_QMI, params)
40 #define qmi_fatal(params...) \
41 	QDF_TRACE_FATAL(QDF_MODULE_ID_QMI, params)
42 
43 #define qmi_nofl_debug(params...) \
44 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_QMI, params)
45 #define qmi_nofl_info(params...) \
46 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_QMI, params)
47 #define qmi_nofl_warn(params...) \
48 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_QMI, params)
49 #define qmi_nofl_err(params...) \
50 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_QMI, params)
51 #define qmi_nofl_fatal(params...) \
52 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_QMI, params)
53 
54 /**
55  * qmi_psoc_obj_create_notification() - Function to allocate per psoc QMI
56  *  private object
57  * @psoc: psoc context
58  * @arg: Pointer to arguments
59  *
60  * This function gets called from object manager when psoc is being
61  * created and creates QMI soc context.
62  *
63  * Return: QDF status
64  */
65 QDF_STATUS
66 qmi_psoc_obj_create_notification(struct wlan_objmgr_psoc *psoc, void *arg);
67 
68 /**
69  * qmi_psoc_obj_destroy_notification() - Free per psoc QMI private object
70  * @psoc: psoc context
71  * @arg: Pointer to arguments
72  *
73  * This function gets called from object manager when psoc is being
74  * deleted and delete QMI soc context.
75  *
76  * Return: QDF status
77  */
78 QDF_STATUS
79 qmi_psoc_obj_destroy_notification(struct wlan_objmgr_psoc *psoc, void *arg);
80 #endif
81