diff options
author | Shan Wei <shanwei@cn.fujitsu.com> | 2011-07-05 23:43:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-05 23:43:12 -0400 |
commit | 712ae51afd55b20c04c5383d02ba5d10233313b1 (patch) | |
tree | a609dc121a1c38c97346ea3bdf8f01a84fb54476 /net | |
parent | 5318d809d7b4975ce5e5303e8508f89a5458c2b6 (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')
-rw-r--r-- | net/8021q/vlan_dev.c | 5 |
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) | |||
586 | static u32 vlan_dev_fix_features(struct net_device *dev, u32 features) | 586 | static u32 vlan_dev_fix_features(struct net_device *dev, u32 features) |
587 | { | 587 | { |
588 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 588 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; |
589 | u32 old_features = features; | ||
589 | 590 | ||
590 | features &= real_dev->features; | 591 | features &= real_dev->features; |
591 | features &= real_dev->vlan_features; | 592 | features &= real_dev->vlan_features; |
593 | |||
594 | if (old_features & NETIF_F_SOFT_FEATURES) | ||
595 | features |= old_features & NETIF_F_SOFT_FEATURES; | ||
596 | |||
592 | if (dev_ethtool_get_rx_csum(real_dev)) | 597 | if (dev_ethtool_get_rx_csum(real_dev)) |
593 | features |= NETIF_F_RXCSUM; | 598 | features |= NETIF_F_RXCSUM; |
594 | features |= NETIF_F_LLTX; | 599 | features |= NETIF_F_LLTX; |