Skip to content

Commit

Permalink
mac802154: Trace the registration of new PANs
Browse files Browse the repository at this point in the history
Add an internal trace when valid beacons are received.

Signed-off-by: David Girault <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Acked-by: Alexander Aring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
  • Loading branch information
David Girault authored and Stefan-Schmidt committed Nov 29, 2022
1 parent 5114728 commit e29e3c7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions net/mac802154/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,31 @@ TRACE_EVENT(802154_drv_set_promiscuous_mode,
BOOL_TO_STR(__entry->on))
);

TRACE_EVENT(802154_new_scan_event,
TP_PROTO(struct ieee802154_coord_desc *desc),
TP_ARGS(desc),
TP_STRUCT__entry(
__field(__le16, pan_id)
__field(__le64, addr)
__field(u8, channel)
__field(u8, page)
),
TP_fast_assign(
__entry->page = desc->page;
__entry->channel = desc->channel;
__entry->pan_id = desc->addr.pan_id;
__entry->addr = desc->addr.extended_addr;
),
TP_printk("panid: %u, coord_addr: 0x%llx, page: %u, channel: %u",
__le16_to_cpu(__entry->pan_id), __le64_to_cpu(__entry->addr),
__entry->page, __entry->channel)
);

DEFINE_EVENT(802154_new_scan_event, 802154_scan_event,
TP_PROTO(struct ieee802154_coord_desc *desc),
TP_ARGS(desc)
);

#endif /* !__MAC802154_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */

#undef TRACE_INCLUDE_PATH
Expand Down

0 comments on commit e29e3c7

Please sign in to comment.