]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: Make net_hwtstamp_validate accessible
authorKory Maincent <kory.maincent@bootlin.com>
Thu, 12 Dec 2024 17:06:42 +0000 (18:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Dec 2024 12:51:40 +0000 (12:51 +0000)
Make the net_hwtstamp_validate function accessible in prevision to use
it from ethtool to validate the hwtstamp configuration before setting it.

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 357543cbde656c6fbae74f525ebc22b7d75bf50a..aa91eed55a4044045d6910c0b952d9e28070d86a 100644 (file)
@@ -312,5 +312,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev,
                            struct netlink_ext_ack *extack);
 int dev_get_hwtstamp_phylib(struct net_device *dev,
                            struct kernel_hwtstamp_config *cfg);
+int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg);
 
 #endif
index 67cf68817f2324bd42ece721d33eecaf69ff4a2f..1f09930fca26d6f222622125ed023ef94a98bffa 100644 (file)
@@ -184,7 +184,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
        return err;
 }
 
-static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg)
+int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg)
 {
        enum hwtstamp_tx_types tx_type;
        enum hwtstamp_rx_filters rx_filter;