aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-15 01:51:01 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-15 01:51:01 -0400
commit19b9a4e256758a0c032c915eebe0a39b370ea133 (patch)
treeace976da19088334694167a9c3234c906a8fcced /net/8021q/vlan_dev.c
parent393e52e33c6c26ec7db290dab803bac1bed962d4 (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.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)