From: Kory Maincent Date: Thu, 12 Dec 2024 17:06:41 +0000 (+0100) Subject: net: Make dev_get_hwtstamp_phylib accessible X-Git-Tag: v6.14-rc1~162^2~211^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e51e50e2324c9374d06ab05e3d7d09123e1114f;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Jacob Keller Signed-off-by: Kory Maincent Signed-off-by: David S. Miller --- diff --git a/net/core/dev.h b/net/core/dev.h index d043dee25a685..357543cbde656 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 46d43b9504713..67cf68817f232 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);