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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 9efd3c67c1db..29aa4cc2a260 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -725,9 +725,22 @@ static u32 vlan_ethtool_get_rx_csum(struct net_device *dev)
725 return real_dev->ethtool_ops->get_rx_csum(real_dev); 725 return real_dev->ethtool_ops->get_rx_csum(real_dev);
726} 726}
727 727
728static u32 vlan_ethtool_get_flags(struct net_device *dev)
729{
730 const struct vlan_dev_info *vlan = vlan_dev_info(dev);
731 struct net_device *real_dev = vlan->real_dev;
732
733 if (!(real_dev->features & NETIF_F_HW_VLAN_RX) ||
734 real_dev->ethtool_ops == NULL ||
735 real_dev->ethtool_ops->get_flags == NULL)
736 return 0;
737 return real_dev->ethtool_ops->get_flags(real_dev);
738}
739
728static const struct ethtool_ops vlan_ethtool_ops = { 740static const struct ethtool_ops vlan_ethtool_ops = {
729 .get_link = ethtool_op_get_link, 741 .get_link = ethtool_op_get_link,
730 .get_rx_csum = vlan_ethtool_get_rx_csum, 742 .get_rx_csum = vlan_ethtool_get_rx_csum,
743 .get_flags = vlan_ethtool_get_flags,
731}; 744};
732 745
733void vlan_setup(struct net_device *dev) 746void vlan_setup(struct net_device *dev)