From patchwork Wed Oct 30 13:54:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13856571 X-Patchwork-Delegate: kuba@kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 66C841E411D; Wed, 30 Oct 2024 13:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730296513; cv=none; b=YF29L3LzPXgGFy2qoz1D/XaCbGxtRFtfAs5WJFfawbt+xgWuDi0Uo1eFUgFed3zGhQkIFwY2axQiL/2PrNZOxtdCm0d42lCpeTDMI4/Gh1DQCsmD1r/evIdqQmG/ZMHvR0uhVdU+dT5K9B1JrmoVBx6cVlge7cC42tXXiFdgZjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730296513; c=relaxed/simple; bh=fLLxAizB9Y30p225SNqqFwWn/BalMkVtTpwZfeA+jYA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nRcL4r6skc4ARUCmGrpye6A3qlFVZnUr2Dv7xEFN1faTwbyqm80NtpEQ8nmDWeB4Yw/mJqROGq677stOLKzZn2w4rryDl8mcfJMfb2O64oAzSiB6vXXg0mZttRMoQ9w0XxhJBXrjJ0I1OktQj2b5eMQdA+IC7OS/THz0ubFKr/A= 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=Fv1Sv6tB; arc=none smtp.client-ip=217.70.183.197 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="Fv1Sv6tB" Received: by mail.gandi.net (Postfix) with ESMTPSA id F06511C0014; Wed, 30 Oct 2024 13:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1730296503; 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=FBWSnrYbPYTXB3jgIun4x/rw7wXL/3v2QiOAW9tdHW4=; b=Fv1Sv6tBcAoXr/iGLwaKDlbCt+E3cScSUIYKGeJkATS48LQ/+pmajW6MCUZUsvQKdZLuFH 02bsLDMTOb/jXel8pJsoASvlccMbbysRMdUr7KCoG6/rTkit3+j+EK91Ot8H1H41HY7glf AmwzGdTQL39PucSWKgiDU21T0yfKVAugN+K3wSVQCg68HErSpYbFeLhRM26MLrRfw9+ps1 rFCyo7L27z5fIgJJL2MEUH4Rnx1xXu3NYREKoDyQbeevIPbRbfvpA27UhYQjkOUq3sDFoc ZT5NVFBUGSWu8cC+nJeTGf2x+/krUJKjXUQll9ozGkQUWbHXVr+3rU6bfF8wvQ== From: Kory Maincent Date: Wed, 30 Oct 2024 14:54:43 +0100 Subject: [PATCH net-next v19 01/10] net: Make dev_get_hwtstamp_phylib accessible Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241030-feature_ptp_netnext-v19-1-94f8aadc9d5c@bootlin.com> References: <20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@bootlin.com> In-Reply-To: <20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@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 X-Patchwork-Delegate: kuba@kernel.org 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); #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 46d43b950471..67cf68817f23 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 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_is_default_hwtstamp(dev->phydev)) return phy_hwtstamp_get(dev->phydev, cfg);