]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: Make dev_get_hwtstamp_phylib accessible
authorKory Maincent <kory.maincent@bootlin.com>
Thu, 12 Dec 2024 17:06:41 +0000 (18:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Dec 2024 12:51:40 +0000 (12:51 +0000)
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>
net/core/dev.h
net/core/dev_ioctl.c

index d043dee25a6854cf6eb431373ff6be6b20bbe67c..357543cbde656c6fbae74f525ebc22b7d75bf50a 100644 (file)
@@ -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
index 46d43b9504713202ea63cfee8042566ae5988b7f..67cf68817f2324bd42ece721d33eecaf69ff4a2f 100644 (file)
@@ -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);