diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan_dev.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 88f318a9601d..722697d31e4f 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/ethtool.h> | ||
31 | #include <net/datalink.h> | 32 | #include <net/datalink.h> |
32 | #include <net/p8022.h> | 33 | #include <net/p8022.h> |
33 | #include <net/arp.h> | 34 | #include <net/arp.h> |
@@ -716,6 +717,22 @@ static void vlan_dev_uninit(struct net_device *dev) | |||
716 | } | 717 | } |
717 | } | 718 | } |
718 | 719 | ||
720 | static u32 vlan_ethtool_get_rx_csum(struct net_device *dev) | ||
721 | { | ||
722 | const struct vlan_dev_info *vlan = vlan_dev_info(dev); | ||
723 | struct net_device *real_dev = vlan->real_dev; | ||
724 | |||
725 | if (real_dev->ethtool_ops == NULL || | ||
726 | real_dev->ethtool_ops->get_rx_csum == NULL) | ||
727 | return 0; | ||
728 | return real_dev->ethtool_ops->get_rx_csum(real_dev); | ||
729 | } | ||
730 | |||
731 | static const struct ethtool_ops vlan_ethtool_ops = { | ||
732 | .get_link = ethtool_op_get_link, | ||
733 | .get_rx_csum = vlan_ethtool_get_rx_csum, | ||
734 | }; | ||
735 | |||
719 | void vlan_setup(struct net_device *dev) | 736 | void vlan_setup(struct net_device *dev) |
720 | { | 737 | { |
721 | ether_setup(dev); | 738 | ether_setup(dev); |
@@ -734,6 +751,7 @@ void vlan_setup(struct net_device *dev) | |||
734 | dev->change_rx_flags = vlan_dev_change_rx_flags; | 751 | dev->change_rx_flags = vlan_dev_change_rx_flags; |
735 | dev->do_ioctl = vlan_dev_ioctl; | 752 | dev->do_ioctl = vlan_dev_ioctl; |
736 | dev->destructor = free_netdev; | 753 | dev->destructor = free_netdev; |
754 | dev->ethtool_ops = &vlan_ethtool_ops; | ||
737 | 755 | ||
738 | memset(dev->broadcast, 0, ETH_ALEN); | 756 | memset(dev->broadcast, 0, ETH_ALEN); |
739 | } | 757 | } |