summaryrefslogtreecommitdiff
path: root/net/ieee802154/trace.h
blob: 9a471e41ec737270a2d9f364564187f2736aaf19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
/* Based on net/wireless/trace.h */

#undef TRACE_SYSTEM
#define TRACE_SYSTEM cfg802154

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

#include <linux/tracepoint.h>

#include <net/cfg802154.h>

#define MAXNAME		32
#define WPAN_PHY_ENTRY	__array(char, wpan_phy_name, MAXNAME)
#define WPAN_PHY_ASSIGN	strlcpy(__entry->wpan_phy_name,	 \
				wpan_phy_name(wpan_phy), \
				MAXNAME)
#define WPAN_PHY_PR_FMT	"%s"
#define WPAN_PHY_PR_ARG	__entry->wpan_phy_name

#define WPAN_DEV_ENTRY	__field(u32, identifier)
#define WPAN_DEV_ASSIGN	(__entry->identifier) = (!IS_ERR_OR_NULL(wpan_dev) \
					 ? wpan_dev->identifier : 0)
#define WPAN_DEV_PR_FMT	"wpan_dev(%u)"
#define WPAN_DEV_PR_ARG	(__entry->identifier)

#define WPAN_CCA_ENTRY	__field(enum nl802154_cca_modes, cca_mode) \
			__field(enum nl802154_cca_opts, cca_opt)
#define WPAN_CCA_ASSIGN \
	do {					 \
		(__entry->cca_mode) = cca->mode; \
		(__entry->cca_opt) = cca->opt;	 \
	} while (0)
#define WPAN_CCA_PR_FMT	"cca_mode: %d, cca_opt: %d"
#define WPAN_CCA_PR_ARG __entry->cca_mode, __entry->cca_opt

#define BOOL_TO_STR(bo) (bo) ? "true" : "false"

/*************************************************************
 *			rdev->ops traces		     *
 *************************************************************/

DECLARE_EVENT_CLASS(wpan_phy_only_evt,
	TP_PROTO(struct wpan_phy *wpan_phy),
	TP_ARGS(wpan_phy),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
	),
	TP_printk(WPAN_PHY_PR_FMT, WPAN_PHY_PR_ARG)
);

DEFINE_EVENT(wpan_phy_only_evt, 802154_rdev_suspend,
	TP_PROTO(struct wpan_phy *wpan_phy),
	TP_ARGS(wpan_phy)
);

DEFINE_EVENT(wpan_phy_only_evt, 802154_rdev_resume,
	TP_PROTO(struct wpan_phy *wpan_phy),
	TP_ARGS(wpan_phy)
);

TRACE_EVENT(802154_rdev_add_virtual_intf,
	TP_PROTO(struct wpan_phy *wpan_phy, char *name,
		 enum nl802154_iftype type, __le64 extended_addr),
	TP_ARGS(wpan_phy, name, type, extended_addr),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		__string(vir_intf_name, name ? name : "<noname>")
		__field(enum nl802154_iftype, type)
		__field(__le64, extended_addr)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		__assign_str(vir_intf_name, name ? name : "<noname>");
		__entry->type = type;
		__entry->extended_addr = extended_addr;
	),
	TP_printk(WPAN_PHY_PR_FMT ", virtual intf name: %s, type: %d, extended addr: 0x%llx",
		  WPAN_PHY_PR_ARG, __get_str(vir_intf_name), __entry->type,
		  __le64_to_cpu(__entry->extended_addr))
);

TRACE_EVENT(802154_rdev_del_virtual_intf,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev),
	TP_ARGS(wpan_phy, wpan_dev),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
	),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT, WPAN_PHY_PR_ARG,
		  WPAN_DEV_PR_ARG)
);

TRACE_EVENT(802154_rdev_set_channel,
	TP_PROTO(struct wpan_phy *wpan_phy, u8 page, u8 channel),
	TP_ARGS(wpan_phy, page, channel),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		__field(u8, page)
		__field(u8, channel)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		__entry->page = page;
		__entry->channel = channel;
	),
	TP_printk(WPAN_PHY_PR_FMT ", page: %d, channel: %d", WPAN_PHY_PR_ARG,
		  __entry->page, __entry->channel)
);

TRACE_EVENT(802154_rdev_set_tx_power,
	TP_PROTO(struct wpan_phy *wpan_phy, s32 power),
	TP_ARGS(wpan_phy, power),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		__field(s32, power)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		__entry->power = power;
	),
	TP_printk(WPAN_PHY_PR_FMT ", mbm: %d", WPAN_PHY_PR_ARG,
		  __entry->power)
);

TRACE_EVENT(802154_rdev_set_cca_mode,
	TP_PROTO(struct wpan_phy *wpan_phy, const struct wpan_phy_cca *cca),
	TP_ARGS(wpan_phy, cca),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_CCA_ENTRY
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_CCA_ASSIGN;
	),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_CCA_PR_FMT, WPAN_PHY_PR_ARG,
		  WPAN_CCA_PR_ARG)
);

TRACE_EVENT(802154_rdev_set_cca_ed_level,
	TP_PROTO(struct wpan_phy *wpan_phy, s32 ed_level),
	TP_ARGS(wpan_phy, ed_level),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		__field(s32, ed_level)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		__entry->ed_level = ed_level;
	),
	TP_printk(WPAN_PHY_PR_FMT ", ed level: %d", WPAN_PHY_PR_ARG,
		  __entry->ed_level)
);

DECLARE_EVENT_CLASS(802154_le16_template,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 __le16 le16arg),
	TP_ARGS(wpan_phy, wpan_dev, le16arg),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(__le16, le16arg)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->le16arg = le16arg;
	),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT ", pan id: 0x%04x",
		  WPAN_PHY_PR_ARG, WPAN_DEV_PR_ARG,
		  __le16_to_cpu(__entry->le16arg))
);

DEFINE_EVENT(802154_le16_template, 802154_rdev_set_pan_id,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 __le16 le16arg),
	TP_ARGS(wpan_phy, wpan_dev, le16arg)
);

DEFINE_EVENT_PRINT(802154_le16_template, 802154_rdev_set_short_addr,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 __le16 le16arg),
	TP_ARGS(wpan_phy, wpan_dev, le16arg),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT ", short addr: 0x%04x",
		  WPAN_PHY_PR_ARG, WPAN_DEV_PR_ARG,
		  __le16_to_cpu(__entry->le16arg))
);

TRACE_EVENT(802154_rdev_set_backoff_exponent,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 u8 min_be, u8 max_be),
	TP_ARGS(wpan_phy, wpan_dev, min_be, max_be),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(u8, min_be)
		__field(u8, max_be)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->min_be = min_be;
		__entry->max_be = max_be;
	),

	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
		  ", min be: %d, max be: %d", WPAN_PHY_PR_ARG,
		  WPAN_DEV_PR_ARG, __entry->min_be, __entry->max_be)
);

TRACE_EVENT(802154_rdev_set_csma_backoffs,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 u8 max_csma_backoffs),
	TP_ARGS(wpan_phy, wpan_dev, max_csma_backoffs),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(u8, max_csma_backoffs)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->max_csma_backoffs = max_csma_backoffs;
	),

	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
		  ", max csma backoffs: %d", WPAN_PHY_PR_ARG,
		  WPAN_DEV_PR_ARG, __entry->max_csma_backoffs)
);

TRACE_EVENT(802154_rdev_set_max_frame_retries,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 s8 max_frame_retries),
	TP_ARGS(wpan_phy, wpan_dev, max_frame_retries),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(s8, max_frame_retries)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->max_frame_retries = max_frame_retries;
	),

	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
		  ", max frame retries: %d", WPAN_PHY_PR_ARG,
		  WPAN_DEV_PR_ARG, __entry->max_frame_retries)
);

TRACE_EVENT(802154_rdev_set_lbt_mode,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 bool mode),
	TP_ARGS(wpan_phy, wpan_dev, mode),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(bool, mode)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->mode = mode;
	),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
		", lbt mode: %s", WPAN_PHY_PR_ARG,
		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->mode))
);

TRACE_EVENT(802154_rdev_set_ackreq_default,
	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
		 bool ackreq),
	TP_ARGS(wpan_phy, wpan_dev, ackreq),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		WPAN_DEV_ENTRY
		__field(bool, ackreq)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		WPAN_DEV_ASSIGN;
		__entry->ackreq = ackreq;
	),
	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
		", ackreq default: %s", WPAN_PHY_PR_ARG,
		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->ackreq))
);

TRACE_EVENT(802154_rdev_return_int,
	TP_PROTO(struct wpan_phy *wpan_phy, int ret),
	TP_ARGS(wpan_phy, ret),
	TP_STRUCT__entry(
		WPAN_PHY_ENTRY
		__field(int, ret)
	),
	TP_fast_assign(
		WPAN_PHY_ASSIGN;
		__entry->ret = ret;
	),
	TP_printk(WPAN_PHY_PR_FMT ", returned: %d", WPAN_PHY_PR_ARG,
		  __entry->ret)
);

#endif /* !__RDEV_CFG802154_OPS_TRACE || TRACE_HEADER_MULTI_READ */

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace
#include <trace/define_trace.h>
g/include/dt-bindings/clock/imx1-clock.h?id=38ab52e8e1e2dd65f2d349f82553335813b638d2'>logplain -rw-r--r--imx21-clock.h2461logplain -rw-r--r--imx27-clock.h3494logplain -rw-r--r--imx5-clock.h7212logplain -rw-r--r--imx6qdl-clock.h9593logplain -rw-r--r--imx6sl-clock.h5849logplain -rw-r--r--imx6sx-clock.h9099logplain -rw-r--r--imx6ul-clock.h8203logplain -rw-r--r--imx7d-clock.h15974logplain -rw-r--r--jz4740-cgu.h1028logplain -rw-r--r--jz4780-cgu.h2470logplain -rw-r--r--lpc18xx-ccu.h2134logplain -rw-r--r--lpc18xx-cgu.h1142logplain -rw-r--r--lpc32xx-clock.h1633logplain -rw-r--r--lsi,axm5516-clks.h974logplain -rw-r--r--marvell,mmp2.h2022logplain -rw-r--r--marvell,pxa168.h1654logplain -rw-r--r--marvell,pxa1928.h1535logplain -rw-r--r--marvell,pxa910.h1598logplain -rw-r--r--maxim,max77620.h632logplain -rw-r--r--maxim,max77686.h648logplain -rw-r--r--maxim,max77802.h630logplain -rw-r--r--meson8b-clkc.h523logplain -rw-r--r--microchip,pic32-clock.h1150logplain -rw-r--r--mpc512x-clock.h2236logplain -rw-r--r--mt2701-clk.h13832logplain -rw-r--r--mt8135-clk.h5641logplain -rw-r--r--mt8173-clk.h9293logplain -rw-r--r--oxsemi,ox810se.h1002logplain -rw-r--r--oxsemi,ox820.h1203logplain -rw-r--r--pistachio-clk.h4863logplain -rw-r--r--pxa-clock.h1715logplain -rw-r--r--qcom,gcc-apq8084.h12872logplain -rw-r--r--qcom,gcc-ipq4019.h5423logplain -rw-r--r--qcom,gcc-ipq806x.h8574logplain -rw-r--r--qcom,gcc-mdm9615.h9497logplain -rw-r--r--qcom,gcc-msm8660.h7932logplain -rw-r--r--qcom,gcc-msm8916.h6190logplain -rw-r--r--qcom,gcc-msm8960.h9342logplain -rw-r--r--qcom,gcc-msm8974.h12340logplain -rw-r--r--qcom,gcc-msm8994.h4858logplain -rw-r--r--qcom,gcc-msm8996.h12575logplain -rw-r--r--qcom,lcc-ipq806x.h899logplain -rw-r--r--qcom,lcc-mdm9615.h1701logplain -rw-r--r--qcom,lcc-msm8960.h1616logplain -rw-r--r--qcom,mmcc-apq8084.h5722logplain -rw-r--r--qcom,mmcc-msm8960.h4109logplain -rw-r--r--qcom,mmcc-msm8974.h5223logplain -rw-r--r--qcom,mmcc-msm8996.h9403logplain -rw-r--r--qcom,rpmcc.h2101logplain -rw-r--r--r7s72100-clock.h1218logplain -rw-r--r--r8a73a4-clock.h1596logplain -rw-r--r--r8a7740-clock.h1992logplain -rw-r--r--r8a7743-cpg-mssr.h1269logplain -rw-r--r--r8a7745-cpg-mssr.h1298logplain -rw-r--r--r8a7778-clock.h1855logplain -rw-r--r--r8a7779-clock.h1647logplain -rw-r--r--r8a7790-clock.h4367logplain -rw-r--r--r8a7791-clock.h4388logplain -rw-r--r--r8a7792-clock.h2562logplain -rw-r--r--r8a7793-clock.h4561logplain -rw-r--r--r8a7794-clock.h3679logplain -rw-r--r--r8a7795-cpg-mssr.h1890logplain -rw-r--r--r8a7796-cpg-mssr.h2066logplain -rw-r--r--renesas-cpg-mssr.h542logplain -rw-r--r--rk1108-cru.h6605logplain -rw-r--r--rk3036-cru.h4584logplain -rw-r--r--rk3066a-cru.h1068logplain -rw-r--r--rk3188-cru-common.h6105logplain -rw-r--r--rk3188-cru.h1435logplain