From patchwork Fri Nov 18 22:10:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13048842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DC71C4321E for ; Fri, 18 Nov 2022 22:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231623AbiKRWLW (ORCPT ); Fri, 18 Nov 2022 17:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiKRWKv (ORCPT ); Fri, 18 Nov 2022 17:10:51 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E72A31EE2; Fri, 18 Nov 2022 14:10:49 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9FC43FF809; Fri, 18 Nov 2022 22:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668809448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1olgmhX/nzQdYt9m5dIM1iGrl1O8ewDG6zq4MYn3qUs=; b=RlPsjtZ0HyJXBTrGUSLctWhqlOirUbCfUpFAPvFjqhGQCoAYR64Phz3WrBkysmO53WKJ0o xweXsZ2A6/dR179l4/8s1PX1EYzcZoxvOXncH5Mqeng4wRaTWTowRVqVM9RX/2KSAK4pSN IRQr8Y5xrOKUg5/NxUyYXSeNgTjXcAFQr7JP8gUt2pZcuKXgGiDVAz630XMVncWeY2yKsD pJO5p2yzdYOOaWZ+hzZdO042BUxQZfn9K/FVnWkIATV7PGUW5tLjbOnbyhtHfqhfaZOm2z IHK77zpxm2CvlvhXTjOYb0tLwMQuW3j/lzol96hYGmWlahf69ViAiqXyI5OpAg== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Guilhem Imberton , Thomas Petazzoni , Miquel Raynal Subject: [PATCH wpan-next v2 2/2] mac802154: Trace the registration of new PANs Date: Fri, 18 Nov 2022 23:10:41 +0100 Message-Id: <20221118221041.1402445-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118221041.1402445-1-miquel.raynal@bootlin.com> References: <20221118221041.1402445-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org From: David Girault Add an internal trace when valid beacons are received. Signed-off-by: David Girault Signed-off-by: Miquel Raynal --- net/mac802154/trace.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/net/mac802154/trace.h b/net/mac802154/trace.h index df855c33daf2..689396d6c76a 100644 --- a/net/mac802154/trace.h +++ b/net/mac802154/trace.h @@ -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