summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-14 22:51:01 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-14 22:51:01 -0700
commit19b9a4e256758a0c032c915eebe0a39b370ea133 (patch)
treeace976da19088334694167a9c3234c906a8fcced /net
parent393e52e33c6c26ec7db290dab803bac1bed962d4 (diff)
downloadlinux-3.10-19b9a4e256758a0c032c915eebe0a39b370ea133.tar.gz
linux-3.10-19b9a4e256758a0c032c915eebe0a39b370ea133.tar.bz2
linux-3.10-19b9a4e256758a0c032c915eebe0a39b370ea133.zip
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')
-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 9efd3c67c1d..29aa4cc2a26 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)
return real_dev->ethtool_ops->get_rx_csum(real_dev);
}
+static u32 vlan_ethtool_get_flags(struct net_device *dev)
+{
+ const struct vlan_dev_info *vlan = vlan_dev_info(dev);
+ struct net_device *real_dev = vlan->real_dev;
+
+ if (!(real_dev->features & NETIF_F_HW_VLAN_RX) ||
+ real_dev->ethtool_ops == NULL ||
+ real_dev->ethtool_ops->get_flags == NULL)
+ return 0;
+ return real_dev->ethtool_ops->get_flags(real_dev);
+}
+
static const struct ethtool_ops vlan_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_rx_csum = vlan_ethtool_get_rx_csum,
+ .get_flags = vlan_ethtool_get_flags,
};
void vlan_setup(struct net_device *dev)