Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp516181lqb; Wed, 29 May 2024 02:43:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXF7j139OuhIr8KfU4WSbsshy8SSHzadNGXUiZymoDsW4VzS8eWMoPgZoP+IxICYgPHHAkXKwnvkS4GDlAAt25znlu5TtwTusWxCTKBWQ== X-Google-Smtp-Source: AGHT+IGhWjEM2Ydf1HU0wSYRCOyzWPKoYveLikyK6mmfUzmrtm7at8eTN7RpqZr7kb5TPQRl9xts X-Received: by 2002:a50:9515:0:b0:578:5f41:bdbe with SMTP id 4fb4d7f45d1cf-5785f41bf1emr7607869a12.32.1716975810005; Wed, 29 May 2024 02:43:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716975809; cv=pass; d=google.com; s=arc-20160816; b=rGjlBQ737k7pEgXfia8ZwAl+XjVnEmO4kLBcvhP3364AFY7Od3Lj7f5q4awxU70khv Ur9+w7A/67Ud39qNZw2DTv/2NuVl04qolLvg/KeHcaBU+JeEHI54IdiGuXjrQcGsoAF3 1G5UmBLkT4k1FwOCfVME4Lx82SHtkX4M9W7BPLu+2OGQSM3gRbtDBGHZRD9An1qekXXs eS2s6773nqmMM/m+rtOcqu8KPHXDMN51OTNDGte330HBbq2S9sSBHuEeS4zT84ggjNK+ QX5S0mEenrfxZmhq/8I44GUtg3PHGwQaBmLa+cOh6DzgYJ12QjglZzMt3R30Q51sez3c VNiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=/wY5nIwKs2GhTR3FxRtzN6G7uZKMKVPVhDediM6W+3I=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=xqTRJUxK8jtb2eDpadhKFQ+WhgNqQ1NF+nB4cfIV++Jyqe65dfKIk1AiM/S1Ys02f9 ew/2PgYndNssr9k4OsVZ2OS/SZYhiQdyo4MAEbom7aobRIGqPJ3OBWYBSHVJPDWp19O+ sMrUBMX2upq3bVKOE9VNXUHLNeYSQUnNUkRcm1/O1UGKuqX1Tq73odMuRrgDIBl7bsG/ IEimi8mrDK9ptGBVLJxGZ7VjBnq6lu+VPQUoj8JiV3SVF3Pl/MVkaGNkCsPqlUDmaKJJ bhuJhwrypxlZSTIgJv3bf9T40AHDIPLnu577gWhUnHQpNGQ8RCJZDUaqeSQFgEFE/5BY JJDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oNj4sXQK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-193865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57860de24desi5588164a12.239.2024.05.29.02.43.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oNj4sXQK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-193865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8705D1F229EE for ; Wed, 29 May 2024 09:43:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F971179972; Wed, 29 May 2024 09:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="oNj4sXQK" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A62B16DECF; Wed, 29 May 2024 09:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716975709; cv=none; b=FT10SCxs5C3qO+xg9JsEicrmN+/51nxx1/cHgXLqRzSg7sl8rBG9Wsrgel9BLFLDiZCCAqxwWKW55b/J0lzAOboyKEcmAdJg2wJ98Btn1VuojcM/T2EA57Bsafj54HYDikuhcAtkwXVZyIR90J7kpZN1/M9AxE3KxoNWHPhK3dw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716975709; c=relaxed/simple; bh=eHaU1x2Q7GOMlFTSXnTKPrVWfwCdrWTwWNIl6Xn6X4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=a1C1tchV82uo+DtcY78YZTqLeGvao3eOE09CpgL6QJA2gd9WKZMqqb61uY1eUWnKe3XU1PM8G6szqUZt7HResb6mHQYjt/IKv38vnGvK8pdSufqHqhkDkAD6tsN9qcJWuhHP8tGalXDN9zBgoX9qWrZtddl5XJ+MxoFXgiensL0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=oNj4sXQK; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F0536000D; Wed, 29 May 2024 09:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1716975700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/wY5nIwKs2GhTR3FxRtzN6G7uZKMKVPVhDediM6W+3I=; b=oNj4sXQK4uSVrz0BjP8TC/GcJA0MfMnsDBjy8pdNOb2LoqV9pzBtl+EzoW8FoKr1zif3u8 ZN4zkkc4N3U4MxsxLnpGIZdBOj5W/iBzzS/q2ENmQtsjD7EySSfu7gxCd2C21hxnIJeC3V wg4mPiqscKsZbyq4BLcYJWn8uhYjbDLuhDj13hCEpCj0zMA3z/8kGrNYL6UDictkeZYhXe sD+I8FK++GQr2TK9zRK4CFzw9AZ76OQt6OGU5dOTRtq/bWCwR+aNzESFhg7Ir1Pi5P5avZ +jkU5sSbdyO1X0ybGMf+IsIFbp5dCozCpB1CSQmT3+leAmQ5AAWv+c/V9Kld7w== From: Kory Maincent Date: Wed, 29 May 2024 11:39:35 +0200 Subject: [PATCH net-next v13 03/14] net: Make dev_get_hwtstamp_phylib accessible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240529-feature_ptp_netnext-v13-3-6eda4d40fa4f@bootlin.com> References: <20240529-feature_ptp_netnext-v13-0-6eda4d40fa4f@bootlin.com> In-Reply-To: <20240529-feature_ptp_netnext-v13-0-6eda4d40fa4f@bootlin.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent X-Mailer: b4 0.13.0 X-GND-Sasl: kory.maincent@bootlin.com Make the dev_get_hwtstamp_phylib function accessible in prevision to use it from ethtool to read the hwtstamp current configuration. Reviewed-by: Florian Fainelli Signed-off-by: Kory Maincent --- Change in v8: - New patch Change in v10: - Remove export symbol as ethtool can't be built as a module. - Move the declaration to net/core/dev.h instead of netdevice.h --- net/core/dev.h | 2 ++ net/core/dev_ioctl.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/core/dev.h b/net/core/dev.h index 58f88d28bc99..75094405b569 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -169,5 +169,7 @@ static inline void dev_xmit_recursion_dec(void) int dev_set_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg, struct netlink_ext_ack *extack); +int dev_get_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg); #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index b9719ed3c3fd..b8cf8c55fa2d 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -268,8 +268,8 @@ static int dev_eth_ioctl(struct net_device *dev, * -EOPNOTSUPP for phylib for now, which is still more accurate than letting * the netdev handle the GET request. */ -static int dev_get_hwtstamp_phylib(struct net_device *dev, - struct kernel_hwtstamp_config *cfg) +int dev_get_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg) { if (phy_has_hwtstamp(dev->phydev)) return phy_hwtstamp_get(dev->phydev, cfg); -- 2.34.1