summaryrefslogtreecommitdiff
path: root/net/8021q
diff options
context:
space:
mode:
authorShan Wei <shanwei@cn.fujitsu.com>2011-07-05 20:43:12 -0700
committerDavid S. Miller <davem@davemloft.net>2011-07-05 20:43:12 -0700
commit712ae51afd55b20c04c5383d02ba5d10233313b1 (patch)
treea609dc121a1c38c97346ea3bdf8f01a84fb54476 /net/8021q
parent5318d809d7b4975ce5e5303e8508f89a5458c2b6 (diff)
net: vlan: enable soft features regardless of underlying device
If gso/gro feature of underlying device is turned off, then new created vlan device never can turn gso/gro on. Although underlying device don't support TSO, we still should use software segments for vlan device. Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan_dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7ea5cf9ea08a..86bff9b1ac47 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -586,9 +586,14 @@ static void vlan_dev_uninit(struct net_device *dev)
static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
+ u32 old_features = features;
features &= real_dev->features;
features &= real_dev->vlan_features;
+
+ if (old_features & NETIF_F_SOFT_FEATURES)
+ features |= old_features & NETIF_F_SOFT_FEATURES;
+
if (dev_ethtool_get_rx_csum(real_dev))
features |= NETIF_F_RXCSUM;
features |= NETIF_F_LLTX;