1 /* SPDX-License-Identifier: ISC */
3 * Copyright (C) 2023 Lorenzo Bianconi <lorenzo@kernel.org>
6 #if !defined(__MT792X_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __MT792X_TRACE_H
9 #include <linux/tracepoint.h>
13 #define TRACE_SYSTEM mt792x
16 #define DEV_ENTRY __array(char, wiphy_name, 32)
17 #define DEV_ASSIGN strscpy(__entry->wiphy_name, \
18 wiphy_name(mt76_hw(dev)->wiphy), MAXNAME)
19 #define DEV_PR_FMT "%s"
20 #define DEV_PR_ARG __entry->wiphy_name
21 #define LP_STATE_PR_ARG __entry->lp_state ? "lp ready" : "lp not ready"
24 TP_PROTO(struct mt792x_dev
*dev
, u8 lp_state
),
26 TP_ARGS(dev
, lp_state
),
35 __entry
->lp_state
= lp_state
;
40 DEV_PR_ARG
, LP_STATE_PR_ARG
46 #undef TRACE_INCLUDE_PATH
47 #define TRACE_INCLUDE_PATH .
48 #undef TRACE_INCLUDE_FILE
49 #define TRACE_INCLUDE_FILE mt792x_trace
51 #include <trace/define_trace.h>