summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorKory Maincent <kory.maincent@bootlin.com>2024-12-12 18:06:41 +0100
committerDavid S. Miller <davem@davemloft.net>2024-12-16 13:51:40 +0100
commit5e51e50e2324c9374d06ab05e3d7d09123e1114f (patch)
treec2934c3017c282eb4e3c25706344c759b3c2efa2 /net/core
parentMerge branch 'tls1.3-key-updates' (diff)
downloadlinux-5e51e50e2324c9374d06ab05e3d7d09123e1114f.tar.xz
linux-5e51e50e2324c9374d06ab05e3d7d09123e1114f.zip
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@broadcom.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.h2
-rw-r--r--net/core/dev_ioctl.c4
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);