1 /*
2  * Copyright (c) 2014, 2016, 2018-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef __HIF_DEBUG_H__
21 #define __HIF_DEBUG_H__
22 #include "qdf_trace.h"
23 
24 #define hif_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_HIF, params)
25 #define hif_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_HIF, params)
26 #define hif_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_HIF, params)
27 #define hif_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_HIF, params)
28 #define hif_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_HIF, params)
29 
30 #define hif_alert(args ...) QDF_TRACE_FATAL(QDF_MODULE_ID_HIF, args)
31 #define hif_err(args ...) QDF_TRACE_ERROR(QDF_MODULE_ID_HIF, args)
32 #define hif_warn(args ...) QDF_TRACE_WARN(QDF_MODULE_ID_HIF, args)
33 #define hif_info(args ...) \
34 	__QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_HIF, ## args)
35 #define hif_debug(args ...) QDF_TRACE_DEBUG(QDF_MODULE_ID_HIF, args)
36 #define hif_info_high(args ...) \
37 	__QDF_TRACE_FL(QDF_TRACE_LEVEL_INFO_HIGH, QDF_MODULE_ID_HIF, ## args)
38 
39 #define hif_nofl_alert(args ...) \
40 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_HIF, args)
41 #define hif_nofl_err(args ...) \
42 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_HIF, args)
43 #define hif_nofl_warn(args ...) \
44 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_HIF, args)
45 #define hif_nofl_info(args ...) \
46 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_HIF, args)
47 #define hif_nofl_debug(args ...) \
48 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_HIF, args)
49 
50 #define HIF_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_HIF, "enter")
51 
52 #define HIF_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_HIF, "exit")
53 
54 #endif /* __HIF_DEBUG_H__ */
55