From nobody Tue Nov 26 00:23:03 2024 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 4FDFA136E21; Wed, 23 Oct 2024 15:49:44 +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=1729698587; cv=none; b=QPp8u7mENENplFTkykQMAs5YOb0Ar6MumxlXjcNdM0QhiuOyb6tXKOOe47x26NaWvG+Lv/0qFCLg5MhOq2F/yTwRl/A8XjYzF0YxqPYRaOQcpWlmbO4MCokhJ1l7olTIaJCltJx4OMMn1bmflbDxoLHPLpO1QB/+YeaKLbxEZn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729698587; c=relaxed/simple; bh=iOMvnmy/90zzok73IJBisUyqD6PHRAxmNiX6LWYKeoc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TPDpSF+/akQkYsCiRF85SbqR0qNj5klQgwF4grZGGT02azKYInvJzR/y6nWTTzvG04zMqNww2t73rO6fReijxfACjZ5PHOlVBzvQm+v7UJNivFZULupXnTNSTuUT1+OYc0uqYHBtGo+GW/iVGMK9F5nmNP4jiNu0eDYnrJTdAhk= 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=mCIJXoKX; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mCIJXoKX" Received: by mail.gandi.net (Postfix) with ESMTPSA id 1F91760007; Wed, 23 Oct 2024 15:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1729698577; 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=GU6SrjYmHXAoTubRlkHJYiK7Q+r5wRUJqJK4SJ0TX/I=; b=mCIJXoKXtU+HdIGJT+O1QIfqks9jV+5lGnOlH/iyWls5uQV5AFklvwtl+jHcfI4A92YI/N rKOmHXIjJ59QgRxzCov3OFSB9WoGsP1o7DumSvRzRbP0f1HT4Z9OT2R2aDiUGFzOhJut4I pFztV0seX6FQA4K7jTdGtl9ny+OQcY9g0DUUpotvJp6mXxbdFXiHrz6r/Yueg/hZNH7fxM vmCQwmaylls/FoWWiaXPO5Yu50CkoPSw7uNoUq/PSAakK66lMOPjUx2PPvzNK4qWEGP5bh Y9tO0hmGDHPu2fCCLu33+iic+5z+NCuLnTVNqHlMm2M7VQNg+z3DhRxCeWWBHw== From: Kory Maincent Date: Wed, 23 Oct 2024 17:49:11 +0200 Subject: [PATCH net-next v18 01/10] 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: quoted-printable Message-Id: <20241023-feature_ptp_netnext-v18-1-ed948f3b6887@bootlin.com> References: <20241023-feature_ptp_netnext-v18-0-ed948f3b6887@bootlin.com> In-Reply-To: <20241023-feature_ptp_netnext-v18-0-ed948f3b6887@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 , donald.hunter@gmail.com, danieller@nvidia.com, ecree.xilinx@gmail.com, Andrew Lunn Cc: Thomas Petazzoni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Willem de Bruijn , Shannon Nelson , Alexandra Winter , Kory Maincent , Jacob Keller X-Mailer: b4 0.14.1 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 Reviewed-by: Jacob Keller 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 7881bced70a9..a1267cff715e 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -285,5 +285,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); =20 #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 473c437b6b53..0267564664b4 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -266,8 +266,8 @@ static int dev_eth_ioctl(struct net_device *dev, * -EOPNOTSUPP for phylib for now, which is still more accurate than letti= ng * 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_is_default_hwtstamp(dev->phydev)) return phy_hwtstamp_get(dev->phydev, cfg); --=20 2.34.1