summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ethtool/common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ethtool/common.c b/net/ethtool/common.c
index aaecfc916a4d..0db5c397a645 100644
--- a/net/ethtool/common.c
+++ b/net/ethtool/common.c
@@ -358,14 +358,18 @@ int __ethtool_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
{
const struct ethtool_ops *ops = dev->ethtool_ops;
struct phy_device *phydev = dev->phydev;
+ int ret;
memset(info, 0, sizeof(*info));
info->cmd = ETHTOOL_GET_TS_INFO;
+ if (ops->get_ts_info) {
+ ret = ops->get_ts_info(dev, info);
+ if (ret != -EOPNOTSUPP)
+ return ret;
+ }
if (phy_has_tsinfo(phydev))
return phy_ts_info(phydev, info);
- if (ops->get_ts_info)
- return ops->get_ts_info(dev, info);
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE;