aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/8021q/vlan_dev.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index d6524b2b206a..376805005cc7 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -26,6 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/skbuff.h> 27#include <linux/skbuff.h>
28#include <linux/netdevice.h> 28#include <linux/netdevice.h>
29#include <linux/net_tstamp.h>
29#include <linux/etherdevice.h> 30#include <linux/etherdevice.h>
30#include <linux/ethtool.h> 31#include <linux/ethtool.h>
31#include <net/arp.h> 32#include <net/arp.h>
@@ -669,6 +670,23 @@ static void vlan_ethtool_get_drvinfo(struct net_device *dev,
669 strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); 670 strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
670} 671}
671 672
673static int vlan_ethtool_get_ts_info(struct net_device *dev,
674 struct ethtool_ts_info *info)
675{
676 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
677 const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops;
678
679 if (ops->get_ts_info) {
680 return ops->get_ts_info(vlan->real_dev, info);
681 } else {
682 info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
683 SOF_TIMESTAMPING_SOFTWARE;
684 info->phc_index = -1;
685 }
686
687 return 0;
688}
689
672static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) 690static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
673{ 691{
674 struct vlan_pcpu_stats *p; 692 struct vlan_pcpu_stats *p;
@@ -752,6 +770,7 @@ static const struct ethtool_ops vlan_ethtool_ops = {
752 .get_settings = vlan_ethtool_get_settings, 770 .get_settings = vlan_ethtool_get_settings,
753 .get_drvinfo = vlan_ethtool_get_drvinfo, 771 .get_drvinfo = vlan_ethtool_get_drvinfo,
754 .get_link = ethtool_op_get_link, 772 .get_link = ethtool_op_get_link,
773 .get_ts_info = vlan_ethtool_get_ts_info,
755}; 774};
756 775
757static const struct net_device_ops vlan_netdev_ops = { 776static const struct net_device_ops vlan_netdev_ops = {