linux/drivers/net/wireless/mediatek/mt76/mt792x_trace.h

/* SPDX-License-Identifier: ISC */
/*
 * Copyright (C) 2023 Lorenzo Bianconi <[email protected]>
 */

#if !defined(__MT792X_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define __MT792X_TRACE_H

#include <linux/tracepoint.h>
#include "mt792x.h"

#undef TRACE_SYSTEM
#define TRACE_SYSTEM

#define MAXNAME
#define DEV_ENTRY
#define DEV_ASSIGN
#define DEV_PR_FMT
#define DEV_PR_ARG
#define LP_STATE_PR_ARG

TRACE_EVENT(lp_event,
	TP_PROTO(struct mt792x_dev *dev, u8 lp_state),

	TP_ARGS(dev, lp_state),

	TP_STRUCT__entry(
		DEV_ENTRY
		__field(u8, lp_state)
	),

	TP_fast_assign(
		DEV_ASSIGN;
		__entry->lp_state = lp_state;
	),

	TP_printk(
		DEV_PR_FMT " %s",
		DEV_PR_ARG, LP_STATE_PR_ARG
	)
);

#endif

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE

#include <trace/define_trace.h>