xref: /openbmc/linux/net/ieee802154/trace.h (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2dec169ecSVarka Bhadram /* Based on net/wireless/trace.h */
31cc800e7SGuido Günther 
41cc800e7SGuido Günther #undef TRACE_SYSTEM
51cc800e7SGuido Günther #define TRACE_SYSTEM cfg802154
61cc800e7SGuido Günther 
71cc800e7SGuido Günther #if !defined(__RDEV_CFG802154_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
81cc800e7SGuido Günther #define __RDEV_CFG802154_OPS_TRACE
91cc800e7SGuido Günther 
101cc800e7SGuido Günther #include <linux/tracepoint.h>
111cc800e7SGuido Günther 
121cc800e7SGuido Günther #include <net/cfg802154.h>
131cc800e7SGuido Günther 
141cc800e7SGuido Günther #define MAXNAME		32
151cc800e7SGuido Günther #define WPAN_PHY_ENTRY	__array(char, wpan_phy_name, MAXNAME)
16*cd912503SAzeem Shaikh #define WPAN_PHY_ASSIGN	strscpy(__entry->wpan_phy_name,	 \
171cc800e7SGuido Günther 				wpan_phy_name(wpan_phy), \
181cc800e7SGuido Günther 				MAXNAME)
191cc800e7SGuido Günther #define WPAN_PHY_PR_FMT	"%s"
201cc800e7SGuido Günther #define WPAN_PHY_PR_ARG	__entry->wpan_phy_name
211cc800e7SGuido Günther 
221cc800e7SGuido Günther #define WPAN_DEV_ENTRY	__field(u32, identifier)
231cc800e7SGuido Günther #define WPAN_DEV_ASSIGN	(__entry->identifier) = (!IS_ERR_OR_NULL(wpan_dev) \
241cc800e7SGuido Günther 					 ? wpan_dev->identifier : 0)
251cc800e7SGuido Günther #define WPAN_DEV_PR_FMT	"wpan_dev(%u)"
261cc800e7SGuido Günther #define WPAN_DEV_PR_ARG	(__entry->identifier)
271cc800e7SGuido Günther 
281cc800e7SGuido Günther #define WPAN_CCA_ENTRY	__field(enum nl802154_cca_modes, cca_mode) \
291cc800e7SGuido Günther 			__field(enum nl802154_cca_opts, cca_opt)
301cc800e7SGuido Günther #define WPAN_CCA_ASSIGN \
311cc800e7SGuido Günther 	do {					 \
321cc800e7SGuido Günther 		(__entry->cca_mode) = cca->mode; \
331cc800e7SGuido Günther 		(__entry->cca_opt) = cca->opt;	 \
341cc800e7SGuido Günther 	} while (0)
351cc800e7SGuido Günther #define WPAN_CCA_PR_FMT	"cca_mode: %d, cca_opt: %d"
361cc800e7SGuido Günther #define WPAN_CCA_PR_ARG __entry->cca_mode, __entry->cca_opt
371cc800e7SGuido Günther 
381cc800e7SGuido Günther #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
391cc800e7SGuido Günther 
401cc800e7SGuido Günther /*************************************************************
411cc800e7SGuido Günther  *			rdev->ops traces		     *
421cc800e7SGuido Günther  *************************************************************/
431cc800e7SGuido Günther 
44a6cb869bSVarka Bhadram DECLARE_EVENT_CLASS(wpan_phy_only_evt,
45a6cb869bSVarka Bhadram 	TP_PROTO(struct wpan_phy *wpan_phy),
46a6cb869bSVarka Bhadram 	TP_ARGS(wpan_phy),
47a6cb869bSVarka Bhadram 	TP_STRUCT__entry(
48a6cb869bSVarka Bhadram 		WPAN_PHY_ENTRY
49a6cb869bSVarka Bhadram 	),
50a6cb869bSVarka Bhadram 	TP_fast_assign(
51a6cb869bSVarka Bhadram 		WPAN_PHY_ASSIGN;
52a6cb869bSVarka Bhadram 	),
53a6cb869bSVarka Bhadram 	TP_printk(WPAN_PHY_PR_FMT, WPAN_PHY_PR_ARG)
54a6cb869bSVarka Bhadram );
55a6cb869bSVarka Bhadram 
56a6cb869bSVarka Bhadram DEFINE_EVENT(wpan_phy_only_evt, 802154_rdev_suspend,
57a6cb869bSVarka Bhadram 	TP_PROTO(struct wpan_phy *wpan_phy),
58a6cb869bSVarka Bhadram 	TP_ARGS(wpan_phy)
59a6cb869bSVarka Bhadram );
60a6cb869bSVarka Bhadram 
61a6cb869bSVarka Bhadram DEFINE_EVENT(wpan_phy_only_evt, 802154_rdev_resume,
62a6cb869bSVarka Bhadram 	TP_PROTO(struct wpan_phy *wpan_phy),
63a6cb869bSVarka Bhadram 	TP_ARGS(wpan_phy)
64a6cb869bSVarka Bhadram );
65a6cb869bSVarka Bhadram 
661cc800e7SGuido Günther TRACE_EVENT(802154_rdev_add_virtual_intf,
671cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, char *name,
681cc800e7SGuido Günther 		 enum nl802154_iftype type, __le64 extended_addr),
691cc800e7SGuido Günther 	TP_ARGS(wpan_phy, name, type, extended_addr),
701cc800e7SGuido Günther 	TP_STRUCT__entry(
711cc800e7SGuido Günther 		WPAN_PHY_ENTRY
721cc800e7SGuido Günther 		__string(vir_intf_name, name ? name : "<noname>")
731cc800e7SGuido Günther 		__field(enum nl802154_iftype, type)
741cc800e7SGuido Günther 		__field(__le64, extended_addr)
751cc800e7SGuido Günther 	),
761cc800e7SGuido Günther 	TP_fast_assign(
771cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
781cc800e7SGuido Günther 		__assign_str(vir_intf_name, name ? name : "<noname>");
791cc800e7SGuido Günther 		__entry->type = type;
801cc800e7SGuido Günther 		__entry->extended_addr = extended_addr;
811cc800e7SGuido Günther 	),
8207bd77faSVarka Bhadram 	TP_printk(WPAN_PHY_PR_FMT ", virtual intf name: %s, type: %d, extended addr: 0x%llx",
831cc800e7SGuido Günther 		  WPAN_PHY_PR_ARG, __get_str(vir_intf_name), __entry->type,
841add1564SAlexander Aring 		  __le64_to_cpu(__entry->extended_addr))
851cc800e7SGuido Günther );
861cc800e7SGuido Günther 
871cc800e7SGuido Günther TRACE_EVENT(802154_rdev_del_virtual_intf,
881cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev),
891cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev),
901cc800e7SGuido Günther 	TP_STRUCT__entry(
911cc800e7SGuido Günther 		WPAN_PHY_ENTRY
921cc800e7SGuido Günther 		WPAN_DEV_ENTRY
931cc800e7SGuido Günther 	),
941cc800e7SGuido Günther 	TP_fast_assign(
951cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
961cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
971cc800e7SGuido Günther 	),
981cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT, WPAN_PHY_PR_ARG,
991cc800e7SGuido Günther 		  WPAN_DEV_PR_ARG)
1001cc800e7SGuido Günther );
1011cc800e7SGuido Günther 
1021cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_channel,
1031cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, u8 page, u8 channel),
1041cc800e7SGuido Günther 	TP_ARGS(wpan_phy, page, channel),
1051cc800e7SGuido Günther 	TP_STRUCT__entry(
1061cc800e7SGuido Günther 		WPAN_PHY_ENTRY
1071cc800e7SGuido Günther 		__field(u8, page)
1081cc800e7SGuido Günther 		__field(u8, channel)
1091cc800e7SGuido Günther 	),
1101cc800e7SGuido Günther 	TP_fast_assign(
1111cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
1121cc800e7SGuido Günther 		__entry->page = page;
1131cc800e7SGuido Günther 		__entry->channel = channel;
1141cc800e7SGuido Günther 	),
1151cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", page: %d, channel: %d", WPAN_PHY_PR_ARG,
1161cc800e7SGuido Günther 		  __entry->page, __entry->channel)
1171cc800e7SGuido Günther );
1181cc800e7SGuido Günther 
1190f999b09SVarka Bhadram TRACE_EVENT(802154_rdev_set_tx_power,
1200f999b09SVarka Bhadram 	TP_PROTO(struct wpan_phy *wpan_phy, s32 power),
1210f999b09SVarka Bhadram 	TP_ARGS(wpan_phy, power),
1220f999b09SVarka Bhadram 	TP_STRUCT__entry(
1230f999b09SVarka Bhadram 		WPAN_PHY_ENTRY
1240f999b09SVarka Bhadram 		__field(s32, power)
1250f999b09SVarka Bhadram 	),
1260f999b09SVarka Bhadram 	TP_fast_assign(
1270f999b09SVarka Bhadram 		WPAN_PHY_ASSIGN;
1280f999b09SVarka Bhadram 		__entry->power = power;
1290f999b09SVarka Bhadram 	),
13007bd77faSVarka Bhadram 	TP_printk(WPAN_PHY_PR_FMT ", mbm: %d", WPAN_PHY_PR_ARG,
1310f999b09SVarka Bhadram 		  __entry->power)
1320f999b09SVarka Bhadram );
1330f999b09SVarka Bhadram 
1341cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_cca_mode,
1351cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, const struct wpan_phy_cca *cca),
1361cc800e7SGuido Günther 	TP_ARGS(wpan_phy, cca),
1371cc800e7SGuido Günther 	TP_STRUCT__entry(
1381cc800e7SGuido Günther 		WPAN_PHY_ENTRY
1391cc800e7SGuido Günther 		WPAN_CCA_ENTRY
1401cc800e7SGuido Günther 	),
1411cc800e7SGuido Günther 	TP_fast_assign(
1421cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
1431cc800e7SGuido Günther 		WPAN_CCA_ASSIGN;
1441cc800e7SGuido Günther 	),
1451cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_CCA_PR_FMT, WPAN_PHY_PR_ARG,
1461cc800e7SGuido Günther 		  WPAN_CCA_PR_ARG)
1471cc800e7SGuido Günther );
1481cc800e7SGuido Günther 
149b69644c1SAlexander Aring TRACE_EVENT(802154_rdev_set_cca_ed_level,
150b69644c1SAlexander Aring 	TP_PROTO(struct wpan_phy *wpan_phy, s32 ed_level),
151b69644c1SAlexander Aring 	TP_ARGS(wpan_phy, ed_level),
152b69644c1SAlexander Aring 	TP_STRUCT__entry(
153b69644c1SAlexander Aring 		WPAN_PHY_ENTRY
154b69644c1SAlexander Aring 		__field(s32, ed_level)
155b69644c1SAlexander Aring 	),
156b69644c1SAlexander Aring 	TP_fast_assign(
157b69644c1SAlexander Aring 		WPAN_PHY_ASSIGN;
158b69644c1SAlexander Aring 		__entry->ed_level = ed_level;
159b69644c1SAlexander Aring 	),
16007bd77faSVarka Bhadram 	TP_printk(WPAN_PHY_PR_FMT ", ed level: %d", WPAN_PHY_PR_ARG,
161b69644c1SAlexander Aring 		  __entry->ed_level)
162b69644c1SAlexander Aring );
163b69644c1SAlexander Aring 
1641cc800e7SGuido Günther DECLARE_EVENT_CLASS(802154_le16_template,
1651cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
1661cc800e7SGuido Günther 		 __le16 le16arg),
1671cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, le16arg),
1681cc800e7SGuido Günther 	TP_STRUCT__entry(
1691cc800e7SGuido Günther 		WPAN_PHY_ENTRY
1701cc800e7SGuido Günther 		WPAN_DEV_ENTRY
1711cc800e7SGuido Günther 		__field(__le16, le16arg)
1721cc800e7SGuido Günther 	),
1731cc800e7SGuido Günther 	TP_fast_assign(
1741cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
1751cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
1761cc800e7SGuido Günther 		__entry->le16arg = le16arg;
1771cc800e7SGuido Günther 	),
1781cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT ", pan id: 0x%04x",
1791cc800e7SGuido Günther 		  WPAN_PHY_PR_ARG, WPAN_DEV_PR_ARG,
1801cc800e7SGuido Günther 		  __le16_to_cpu(__entry->le16arg))
1811cc800e7SGuido Günther );
1821cc800e7SGuido Günther 
1831cc800e7SGuido Günther DEFINE_EVENT(802154_le16_template, 802154_rdev_set_pan_id,
1841cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
1851cc800e7SGuido Günther 		 __le16 le16arg),
1861cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, le16arg)
1871cc800e7SGuido Günther );
1881cc800e7SGuido Günther 
1891cc800e7SGuido Günther DEFINE_EVENT_PRINT(802154_le16_template, 802154_rdev_set_short_addr,
1901cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
1911cc800e7SGuido Günther 		 __le16 le16arg),
1921cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, le16arg),
19307bd77faSVarka Bhadram 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT ", short addr: 0x%04x",
1941add1564SAlexander Aring 		  WPAN_PHY_PR_ARG, WPAN_DEV_PR_ARG,
1951add1564SAlexander Aring 		  __le16_to_cpu(__entry->le16arg))
1961cc800e7SGuido Günther );
1971cc800e7SGuido Günther 
1981cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_backoff_exponent,
1991cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
2001cc800e7SGuido Günther 		 u8 min_be, u8 max_be),
2011cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, min_be, max_be),
2021cc800e7SGuido Günther 	TP_STRUCT__entry(
2031cc800e7SGuido Günther 		WPAN_PHY_ENTRY
2041cc800e7SGuido Günther 		WPAN_DEV_ENTRY
2051cc800e7SGuido Günther 		__field(u8, min_be)
2061cc800e7SGuido Günther 		__field(u8, max_be)
2071cc800e7SGuido Günther 	),
2081cc800e7SGuido Günther 	TP_fast_assign(
2091cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
2101cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
2111cc800e7SGuido Günther 		__entry->min_be = min_be;
2121cc800e7SGuido Günther 		__entry->max_be = max_be;
2131cc800e7SGuido Günther 	),
2141cc800e7SGuido Günther 
2151cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
21607bd77faSVarka Bhadram 		  ", min be: %d, max be: %d", WPAN_PHY_PR_ARG,
2171cc800e7SGuido Günther 		  WPAN_DEV_PR_ARG, __entry->min_be, __entry->max_be)
2181cc800e7SGuido Günther );
2191cc800e7SGuido Günther 
2201cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_csma_backoffs,
2211cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
2221cc800e7SGuido Günther 		 u8 max_csma_backoffs),
2231cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, max_csma_backoffs),
2241cc800e7SGuido Günther 	TP_STRUCT__entry(
2251cc800e7SGuido Günther 		WPAN_PHY_ENTRY
2261cc800e7SGuido Günther 		WPAN_DEV_ENTRY
2271cc800e7SGuido Günther 		__field(u8, max_csma_backoffs)
2281cc800e7SGuido Günther 	),
2291cc800e7SGuido Günther 	TP_fast_assign(
2301cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
2311cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
2321cc800e7SGuido Günther 		__entry->max_csma_backoffs = max_csma_backoffs;
2331cc800e7SGuido Günther 	),
2341cc800e7SGuido Günther 
2351cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
2361cc800e7SGuido Günther 		  ", max csma backoffs: %d", WPAN_PHY_PR_ARG,
2371cc800e7SGuido Günther 		  WPAN_DEV_PR_ARG, __entry->max_csma_backoffs)
2381cc800e7SGuido Günther );
2391cc800e7SGuido Günther 
2401cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_max_frame_retries,
2411cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
2421cc800e7SGuido Günther 		 s8 max_frame_retries),
2431cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, max_frame_retries),
2441cc800e7SGuido Günther 	TP_STRUCT__entry(
2451cc800e7SGuido Günther 		WPAN_PHY_ENTRY
2461cc800e7SGuido Günther 		WPAN_DEV_ENTRY
2471cc800e7SGuido Günther 		__field(s8, max_frame_retries)
2481cc800e7SGuido Günther 	),
2491cc800e7SGuido Günther 	TP_fast_assign(
2501cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
2511cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
2521cc800e7SGuido Günther 		__entry->max_frame_retries = max_frame_retries;
2531cc800e7SGuido Günther 	),
2541cc800e7SGuido Günther 
2551cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
2561cc800e7SGuido Günther 		  ", max frame retries: %d", WPAN_PHY_PR_ARG,
2571cc800e7SGuido Günther 		  WPAN_DEV_PR_ARG, __entry->max_frame_retries)
2581cc800e7SGuido Günther );
2591cc800e7SGuido Günther 
2601cc800e7SGuido Günther TRACE_EVENT(802154_rdev_set_lbt_mode,
2611cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
2621cc800e7SGuido Günther 		 bool mode),
2631cc800e7SGuido Günther 	TP_ARGS(wpan_phy, wpan_dev, mode),
2641cc800e7SGuido Günther 	TP_STRUCT__entry(
2651cc800e7SGuido Günther 		WPAN_PHY_ENTRY
2661cc800e7SGuido Günther 		WPAN_DEV_ENTRY
2671cc800e7SGuido Günther 		__field(bool, mode)
2681cc800e7SGuido Günther 	),
2691cc800e7SGuido Günther 	TP_fast_assign(
2701cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
2711cc800e7SGuido Günther 		WPAN_DEV_ASSIGN;
2721cc800e7SGuido Günther 		__entry->mode = mode;
2731cc800e7SGuido Günther 	),
2741cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
2751cc800e7SGuido Günther 		", lbt mode: %s", WPAN_PHY_PR_ARG,
2761cc800e7SGuido Günther 		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->mode))
2771cc800e7SGuido Günther );
2781cc800e7SGuido Günther 
279c91208d8SAlexander Aring TRACE_EVENT(802154_rdev_set_ackreq_default,
280c91208d8SAlexander Aring 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
281c91208d8SAlexander Aring 		 bool ackreq),
282c91208d8SAlexander Aring 	TP_ARGS(wpan_phy, wpan_dev, ackreq),
283c91208d8SAlexander Aring 	TP_STRUCT__entry(
284c91208d8SAlexander Aring 		WPAN_PHY_ENTRY
285c91208d8SAlexander Aring 		WPAN_DEV_ENTRY
286c91208d8SAlexander Aring 		__field(bool, ackreq)
287c91208d8SAlexander Aring 	),
288c91208d8SAlexander Aring 	TP_fast_assign(
289c91208d8SAlexander Aring 		WPAN_PHY_ASSIGN;
290c91208d8SAlexander Aring 		WPAN_DEV_ASSIGN;
291c91208d8SAlexander Aring 		__entry->ackreq = ackreq;
292c91208d8SAlexander Aring 	),
293c91208d8SAlexander Aring 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
294c91208d8SAlexander Aring 		", ackreq default: %s", WPAN_PHY_PR_ARG,
295c91208d8SAlexander Aring 		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->ackreq))
296c91208d8SAlexander Aring );
297c91208d8SAlexander Aring 
298ed3557c9SMiquel Raynal TRACE_EVENT(802154_rdev_trigger_scan,
299ed3557c9SMiquel Raynal 	TP_PROTO(struct wpan_phy *wpan_phy,
300ed3557c9SMiquel Raynal 		 struct cfg802154_scan_request *request),
301ed3557c9SMiquel Raynal 	TP_ARGS(wpan_phy, request),
302ed3557c9SMiquel Raynal 	TP_STRUCT__entry(
303ed3557c9SMiquel Raynal 		WPAN_PHY_ENTRY
304ed3557c9SMiquel Raynal 		__field(u8, page)
305ed3557c9SMiquel Raynal 		__field(u32, channels)
306ed3557c9SMiquel Raynal 		__field(u8, duration)
307ed3557c9SMiquel Raynal 	),
308ed3557c9SMiquel Raynal 	TP_fast_assign(
309ed3557c9SMiquel Raynal 		WPAN_PHY_ASSIGN;
310ed3557c9SMiquel Raynal 		__entry->page = request->page;
311ed3557c9SMiquel Raynal 		__entry->channels = request->channels;
312ed3557c9SMiquel Raynal 		__entry->duration = request->duration;
313ed3557c9SMiquel Raynal 	),
314ed3557c9SMiquel Raynal 	TP_printk(WPAN_PHY_PR_FMT ", scan, page: %d, channels: %x, duration %d",
315ed3557c9SMiquel Raynal 		  WPAN_PHY_PR_ARG, __entry->page, __entry->channels, __entry->duration)
316ed3557c9SMiquel Raynal );
317ed3557c9SMiquel Raynal 
3189bc11450SMiquel Raynal TRACE_EVENT(802154_rdev_send_beacons,
3199bc11450SMiquel Raynal 	TP_PROTO(struct wpan_phy *wpan_phy,
3209bc11450SMiquel Raynal 		 struct cfg802154_beacon_request *request),
3219bc11450SMiquel Raynal 	TP_ARGS(wpan_phy, request),
3229bc11450SMiquel Raynal 	TP_STRUCT__entry(
3239bc11450SMiquel Raynal 		WPAN_PHY_ENTRY
3249bc11450SMiquel Raynal 		__field(u8, interval)
3259bc11450SMiquel Raynal 	),
3269bc11450SMiquel Raynal 	TP_fast_assign(
3279bc11450SMiquel Raynal 		WPAN_PHY_ASSIGN;
3289bc11450SMiquel Raynal 		__entry->interval = request->interval;
3299bc11450SMiquel Raynal 	),
3309bc11450SMiquel Raynal 	TP_printk(WPAN_PHY_PR_FMT ", sending beacons (interval order: %d)",
3319bc11450SMiquel Raynal 		  WPAN_PHY_PR_ARG, __entry->interval)
3329bc11450SMiquel Raynal );
3339bc11450SMiquel Raynal 
334ed3557c9SMiquel Raynal DECLARE_EVENT_CLASS(802154_wdev_template,
335ed3557c9SMiquel Raynal 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev),
336ed3557c9SMiquel Raynal 	TP_ARGS(wpan_phy, wpan_dev),
337ed3557c9SMiquel Raynal 	TP_STRUCT__entry(
338ed3557c9SMiquel Raynal 		WPAN_PHY_ENTRY
339ed3557c9SMiquel Raynal 		WPAN_DEV_ENTRY
340ed3557c9SMiquel Raynal 	),
341ed3557c9SMiquel Raynal 	TP_fast_assign(
342ed3557c9SMiquel Raynal 		WPAN_PHY_ASSIGN;
343ed3557c9SMiquel Raynal 		WPAN_DEV_ASSIGN;
344ed3557c9SMiquel Raynal 	),
345ed3557c9SMiquel Raynal 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT,
346ed3557c9SMiquel Raynal 		  WPAN_PHY_PR_ARG, WPAN_DEV_PR_ARG)
347ed3557c9SMiquel Raynal );
348ed3557c9SMiquel Raynal 
349ed3557c9SMiquel Raynal DEFINE_EVENT(802154_wdev_template, 802154_rdev_abort_scan,
350ed3557c9SMiquel Raynal 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev),
351ed3557c9SMiquel Raynal 	TP_ARGS(wpan_phy, wpan_dev)
352ed3557c9SMiquel Raynal );
353ed3557c9SMiquel Raynal 
3549bc11450SMiquel Raynal DEFINE_EVENT(802154_wdev_template, 802154_rdev_stop_beacons,
3559bc11450SMiquel Raynal 	TP_PROTO(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev),
3569bc11450SMiquel Raynal 	TP_ARGS(wpan_phy, wpan_dev)
3579bc11450SMiquel Raynal );
3589bc11450SMiquel Raynal 
3591cc800e7SGuido Günther TRACE_EVENT(802154_rdev_return_int,
3601cc800e7SGuido Günther 	TP_PROTO(struct wpan_phy *wpan_phy, int ret),
3611cc800e7SGuido Günther 	TP_ARGS(wpan_phy, ret),
3621cc800e7SGuido Günther 	TP_STRUCT__entry(
3631cc800e7SGuido Günther 		WPAN_PHY_ENTRY
3641cc800e7SGuido Günther 		__field(int, ret)
3651cc800e7SGuido Günther 	),
3661cc800e7SGuido Günther 	TP_fast_assign(
3671cc800e7SGuido Günther 		WPAN_PHY_ASSIGN;
3681cc800e7SGuido Günther 		__entry->ret = ret;
3691cc800e7SGuido Günther 	),
3701cc800e7SGuido Günther 	TP_printk(WPAN_PHY_PR_FMT ", returned: %d", WPAN_PHY_PR_ARG,
3711cc800e7SGuido Günther 		  __entry->ret)
3721cc800e7SGuido Günther );
3731cc800e7SGuido Günther 
3741cc800e7SGuido Günther #endif /* !__RDEV_CFG802154_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3751cc800e7SGuido Günther 
3761cc800e7SGuido Günther #undef TRACE_INCLUDE_PATH
3771cc800e7SGuido Günther #define TRACE_INCLUDE_PATH .
3781cc800e7SGuido Günther #undef TRACE_INCLUDE_FILE
3791cc800e7SGuido Günther #define TRACE_INCLUDE_FILE trace
3801cc800e7SGuido Günther #include <trace/define_trace.h>
381