Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Make net_hwtstamp_validate accessible

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>

authored by

Kory Maincent and committed by
David S. Miller
b18fe47c 5e51e50e

+2 -1
+1
net/core/dev.h
··· 312 312 struct netlink_ext_ack *extack); 313 313 int dev_get_hwtstamp_phylib(struct net_device *dev, 314 314 struct kernel_hwtstamp_config *cfg); 315 + int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg); 315 316 316 317 #endif
+1 -1
net/core/dev_ioctl.c
··· 184 184 return err; 185 185 } 186 186 187 - static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) 187 + int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) 188 188 { 189 189 enum hwtstamp_tx_types tx_type; 190 190 enum hwtstamp_rx_filters rx_filter;