Commit f11970e383acd6f505f492f1bc07fb1a4d884829
Committed by
David S. Miller
1 parent
6dcbbe25dc
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
net/core/dev.c
... | ... | @@ -1308,6 +1308,13 @@ |
1308 | 1308 | { |
1309 | 1309 | u32 flags; |
1310 | 1310 | |
1311 | + /* | |
1312 | + * If we're trying to disable lro on a vlan device | |
1313 | + * use the underlying physical device instead | |
1314 | + */ | |
1315 | + if (is_vlan_dev(dev)) | |
1316 | + dev = vlan_dev_real_dev(dev); | |
1317 | + | |
1311 | 1318 | if (dev->ethtool_ops && dev->ethtool_ops->get_flags) |
1312 | 1319 | flags = dev->ethtool_ops->get_flags(dev); |
1313 | 1320 | else |