Re: [PATCH net-next v5 05/16] net: Make dev_set_hwtstamp_phylib accessible

From
Florian Fainelli <f.fainelli@gmail.com>
Date
2023-10-09 21:09:39
Also in
linux-doc, lkml
Reply to
Köry Maincent, 2023-10-09
On 10/9/23 08:51, Köry Maincent wrote:
quoted hunk ↗ jump to hunk
From: Kory Maincent <kory.maincent@bootlin.com>

Make the dev_set_hwtstamp_phylib function accessible in prevision to use
it from ethtool to reset the tstamp current configuration.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
  include/linux/netdevice.h | 3 +++
  net/core/dev_ioctl.c      | 6 +++---
  2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e070a4540fba..b9d0411836db 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3922,6 +3922,9 @@ int generic_hwtstamp_get_lower(struct net_device *dev,
  int generic_hwtstamp_set_lower(struct net_device *dev,
  			       struct kernel_hwtstamp_config *kernel_cfg,
  			       struct netlink_ext_ack *extack);
+int dev_set_hwtstamp_phylib(struct net_device *dev,
+			    struct kernel_hwtstamp_config *cfg,
+			    struct netlink_ext_ack *extack);
  int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata);
  unsigned int dev_get_flags(const struct net_device *);
  int __dev_change_flags(struct net_device *dev, unsigned int flags,
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index b46aedc36939..342a667858ac 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -322,9 +322,9 @@ static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr)
   * frames and not forward them), it must set IFF_SEE_ALL_HWTSTAMP_REQUESTS in
   * dev->priv_flags.
   */
-static int dev_set_hwtstamp_phylib(struct net_device *dev,
-				   struct kernel_hwtstamp_config *cfg,
-				   struct netlink_ext_ack *extack)
+int dev_set_hwtstamp_phylib(struct net_device *dev,
+			    struct kernel_hwtstamp_config *cfg,
+			    struct netlink_ext_ack *extack)
  {
  	const struct net_device_ops *ops = dev->netdev_ops;
  	bool phy_ts = phy_has_hwtstamp(dev->phydev);
Missing EXPORT_SYMBOL_GPL() here?
-- 
Florian
Thread (61 messages) 61 messages, 11 authors, last reply 2023-10-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help