aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f7e83f6d2e64..236452ebbd9e 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -29,6 +29,7 @@
29#include <linux/net_tstamp.h> 29#include <linux/net_tstamp.h>
30#include <linux/etherdevice.h> 30#include <linux/etherdevice.h>
31#include <linux/ethtool.h> 31#include <linux/ethtool.h>
32#include <linux/phy.h>
32#include <net/arp.h> 33#include <net/arp.h>
33#include <net/switchdev.h> 34#include <net/switchdev.h>
34 35
@@ -665,8 +666,11 @@ static int vlan_ethtool_get_ts_info(struct net_device *dev,
665{ 666{
666 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); 667 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
667 const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops; 668 const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops;
669 struct phy_device *phydev = vlan->real_dev->phydev;
668 670
669 if (ops->get_ts_info) { 671 if (phydev && phydev->drv && phydev->drv->ts_info) {
672 return phydev->drv->ts_info(phydev, info);
673 } else if (ops->get_ts_info) {
670 return ops->get_ts_info(vlan->real_dev, info); 674 return ops->get_ts_info(vlan->real_dev, info);
671 } else { 675 } else {
672 info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE | 676 info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |