diff options
author | Richard Cochran <richardcochran@gmail.com> | 2023-11-14 14:28:31 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-11-18 17:52:57 +0300 |
commit | b8768dc4077712915f045ba1b198f521493c7914 (patch) | |
tree | 9bdc8989c24dae76c118696b6b838acdc86d8b34 /include/linux/ethtool.h | |
parent | 430dc3256d5790361135c69af5de1aaa07248e8a (diff) | |
download | linux-b8768dc4077712915f045ba1b198f521493c7914.tar.xz |
net: ethtool: Refactor identical get_ts_info implementations.
The vlan, macvlan and the bonding drivers call their "real" device driver
in order to report the time stamping capabilities. Provide a core
ethtool helper function to avoid copy/paste in the stack.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 689028257fcc..c2bb74143eda 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -1044,6 +1044,14 @@ static inline int ethtool_mm_frag_size_min_to_add(u32 val_min, u32 *val_add, } /** + * ethtool_get_ts_info_by_layer - Obtains time stamping capabilities from the MAC or PHY layer. + * @dev: pointer to net_device structure + * @info: buffer to hold the result + * Returns zero on success, non-zero otherwise. + */ +int ethtool_get_ts_info_by_layer(struct net_device *dev, struct ethtool_ts_info *info); + +/** * ethtool_sprintf - Write formatted string to ethtool string data * @data: Pointer to a pointer to the start of string to update * @fmt: Format of string to write |