WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / mediatek / mt76 / mt7615 / mt7615_trace.h
blobd3eb49d83b98de7a32d018313840ed352cf77ab0
1 /* SPDX-License-Identifier: ISC */
2 /*
3 * Copyright (C) 2019 Lorenzo Bianconi <lorenzo@kernel.org>
4 */
6 #if !defined(__MT7615_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __MT7615_TRACE_H
9 #include <linux/tracepoint.h>
10 #include "mt7615.h"
12 #undef TRACE_SYSTEM
13 #define TRACE_SYSTEM mt7615
15 #define MAXNAME 32
16 #define DEV_ENTRY __array(char, wiphy_name, 32)
17 #define DEV_ASSIGN strlcpy(__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
22 #define TOKEN_ENTRY __field(u16, token)
23 #define TOKEN_ASSIGN __entry->token = token
24 #define TOKEN_PR_FMT " %d"
25 #define TOKEN_PR_ARG __entry->token
27 DECLARE_EVENT_CLASS(dev_token,
28 TP_PROTO(struct mt7615_dev *dev, u16 token),
29 TP_ARGS(dev, token),
30 TP_STRUCT__entry(
31 DEV_ENTRY
32 TOKEN_ENTRY
34 TP_fast_assign(
35 DEV_ASSIGN;
36 TOKEN_ASSIGN;
38 TP_printk(
39 DEV_PR_FMT TOKEN_PR_FMT,
40 DEV_PR_ARG, TOKEN_PR_ARG
44 DEFINE_EVENT(dev_token, mac_tx_free,
45 TP_PROTO(struct mt7615_dev *dev, u16 token),
46 TP_ARGS(dev, token)
49 #endif
51 #undef TRACE_INCLUDE_PATH
52 #define TRACE_INCLUDE_PATH .
53 #undef TRACE_INCLUDE_FILE
54 #define TRACE_INCLUDE_FILE mt7615_trace
56 #include <trace/define_trace.h>