macvlan.c (023265ed75d8792ca1d555430a8985511d3f8788) macvlan.c (d25de984aaee5265ff0c2c4eb49e474096d29827)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net>
4 *
5 * The code this is based on carried the following copyright notice:
6 * ---
7 * (C) Copyright 2001-2006
8 * Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com

--- 1022 unchanged lines hidden (view full) ---

1031
1032static int macvlan_ethtool_get_ts_info(struct net_device *dev,
1033 struct ethtool_ts_info *info)
1034{
1035 struct net_device *real_dev = macvlan_dev_real_dev(dev);
1036 const struct ethtool_ops *ops = real_dev->ethtool_ops;
1037 struct phy_device *phydev = real_dev->phydev;
1038
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net>
4 *
5 * The code this is based on carried the following copyright notice:
6 * ---
7 * (C) Copyright 2001-2006
8 * Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com

--- 1022 unchanged lines hidden (view full) ---

1031
1032static int macvlan_ethtool_get_ts_info(struct net_device *dev,
1033 struct ethtool_ts_info *info)
1034{
1035 struct net_device *real_dev = macvlan_dev_real_dev(dev);
1036 const struct ethtool_ops *ops = real_dev->ethtool_ops;
1037 struct phy_device *phydev = real_dev->phydev;
1038
1039 if (phydev && phydev->drv && phydev->drv->ts_info) {
1040 return phydev->drv->ts_info(phydev, info);
1039 if (phy_has_tsinfo(phydev)) {
1040 return phy_ts_info(phydev, info);
1041 } else if (ops->get_ts_info) {
1042 return ops->get_ts_info(real_dev, info);
1043 } else {
1044 info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
1045 SOF_TIMESTAMPING_SOFTWARE;
1046 info->phc_index = -1;
1047 }
1048

--- 714 unchanged lines hidden ---
1041 } else if (ops->get_ts_info) {
1042 return ops->get_ts_info(real_dev, info);
1043 } else {
1044 info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
1045 SOF_TIMESTAMPING_SOFTWARE;
1046 info->phc_index = -1;
1047 }
1048

--- 714 unchanged lines hidden ---