Skip to content

Commit

Permalink
net: Make net_hwtstamp_validate accessible
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kory Maincent authored and David S. Miller committed Dec 16, 2024
1 parent 5e51e50 commit b18fe47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions net/core/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion net/core/dev_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b18fe47

Please sign in to comment.