summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2011-05-24 08:31:09 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-25 17:55:25 -0400
commitf11970e383acd6f505f492f1bc07fb1a4d884829 (patch)
tree5dfa4653fedb08174f1143146a6fb205033d5243 /net/core/dev.c
parent6dcbbe25dcc9bd2bdeb4f685f8fb874ffc10e6be (diff)
downloadlinux-f11970e383acd6f505f492f1bc07fb1a4d884829.tar.bz2
net: make dev_disable_lro use physical device if passed a vlan dev (v2)
If the device passed into dev_disable_lro is a vlan, then repoint the dev poniter so that we actually modify the underlying physical device. Signed-of-by: Neil Horman <nhorman@tuxdriver.com> CC: davem@davemloft.net CC: bhutchings@solarflare.com Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ec11d757c1fc..c7e305d13b71 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1308,6 +1308,13 @@ void dev_disable_lro(struct net_device *dev)
{
u32 flags;
+ /*
+ * If we're trying to disable lro on a vlan device
+ * use the underlying physical device instead
+ */
+ if (is_vlan_dev(dev))
+ dev = vlan_dev_real_dev(dev);
+
if (dev->ethtool_ops && dev->ethtool_ops->get_flags)
flags = dev->ethtool_ops->get_flags(dev);
else