drm: bridge: adv7511: remove s32 format from i2s capabilities
[drm/drm-misc.git] / drivers / net / wireless / mediatek / mt76 / mt76x02_trace.h
blob11d119cd0f6fd0349228444e9d225e9bfc531073
1 /* SPDX-License-Identifier: ISC */
2 /*
3 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
4 */
6 #if !defined(__MT76x02_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __MT76x02_TRACE_H
9 #include <linux/tracepoint.h>
10 #include "mt76x02.h"
12 #undef TRACE_SYSTEM
13 #define TRACE_SYSTEM mt76x02
15 #define MAXNAME 32
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
22 #define TXID_ENTRY __field(u8, wcid) __field(u8, pktid)
23 #define TXID_PR_FMT " [%d:%d]"
24 #define TXID_PR_ARG __entry->wcid, __entry->pktid
26 DECLARE_EVENT_CLASS(dev_evt,
27 TP_PROTO(struct mt76x02_dev *dev),
28 TP_ARGS(dev),
29 TP_STRUCT__entry(
30 DEV_ENTRY
32 TP_fast_assign(
33 DEV_ASSIGN;
35 TP_printk(DEV_PR_FMT, DEV_PR_ARG)
38 DEFINE_EVENT(dev_evt, mac_txstat_poll,
39 TP_PROTO(struct mt76x02_dev *dev),
40 TP_ARGS(dev)
43 TRACE_EVENT(mac_txstat_fetch,
44 TP_PROTO(struct mt76x02_dev *dev,
45 struct mt76x02_tx_status *stat),
47 TP_ARGS(dev, stat),
49 TP_STRUCT__entry(
50 DEV_ENTRY
51 TXID_ENTRY
52 __field(bool, success)
53 __field(bool, aggr)
54 __field(bool, ack_req)
55 __field(u16, rate)
56 __field(u8, retry)
59 TP_fast_assign(
60 DEV_ASSIGN;
61 __entry->success = stat->success;
62 __entry->aggr = stat->aggr;
63 __entry->ack_req = stat->ack_req;
64 __entry->wcid = stat->wcid;
65 __entry->pktid = stat->pktid;
66 __entry->rate = stat->rate;
67 __entry->retry = stat->retry;
70 TP_printk(
71 DEV_PR_FMT TXID_PR_FMT
72 " success:%d aggr:%d ack_req:%d"
73 " rate:%04x retry:%d",
74 DEV_PR_ARG, TXID_PR_ARG,
75 __entry->success, __entry->aggr, __entry->ack_req,
76 __entry->rate, __entry->retry
80 #endif
82 #undef TRACE_INCLUDE_PATH
83 #define TRACE_INCLUDE_PATH .
84 #undef TRACE_INCLUDE_FILE
85 #define TRACE_INCLUDE_FILE mt76x02_trace
87 #include <trace/define_trace.h>