[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241204-feature_ptp_netnext-v20-1-9bd99dc8a867@bootlin.com>
Date: Wed, 04 Dec 2024 15:44:42 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Radu Pirea <radu-nicolae.pirea@....nxp.com>,
Jay Vosburgh <j.vosburgh@...il.com>, Andy Gospodarek <andy@...yhouse.net>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jonathan Corbet <corbet@....net>,
Horatiu Vultur <horatiu.vultur@...rochip.com>, UNGLinuxDriver@...rochip.com,
Simon Horman <horms@...nel.org>, Vladimir Oltean <vladimir.oltean@....com>,
donald.hunter@...il.com, danieller@...dia.com, ecree.xilinx@...il.com,
Andrew Lunn <andrew+netdev@...n.ch>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-doc@...r.kernel.org,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>,
Willem de Bruijn <willemb@...gle.com>,
Shannon Nelson <shannon.nelson@....com>,
Alexandra Winter <wintera@...ux.ibm.com>,
Kory Maincent <kory.maincent@...tlin.com>,
Jacob Keller <jacob.e.keller@...el.com>
Subject: [PATCH net-next v20 1/6] net: Make dev_get_hwtstamp_phylib
accessible
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 <florian.fainelli@...adcom.com>
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
---
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 d043dee25a68..357543cbde65 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -310,5 +310,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);
--
2.34.1
Powered by blists - more mailing lists