diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-15 01:51:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 01:51:01 -0400 |
commit | 19b9a4e256758a0c032c915eebe0a39b370ea133 (patch) | |
tree | ace976da19088334694167a9c3234c906a8fcced /net/8021q/vlan_dev.c | |
parent | 393e52e33c6c26ec7db290dab803bac1bed962d4 (diff) |
vlan: ethtool ->get_flags support
Allow to query LRO settings of underlying device when VLAN RX
acceleration is used.
Suggested by Ben Hutchings <bhutchings@solarflare.com>.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 13 |
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 | ||
728 | static 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 | |||
728 | static const struct ethtool_ops vlan_ethtool_ops = { | 740 | static 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 | ||
733 | void vlan_setup(struct net_device *dev) | 746 | void vlan_setup(struct net_device *dev) |