[VLAN]: Propagate selected feature bits to VLAN devices

Propagate feature bits from the NETDEV_FEAT_CHANGE notifier. For now
only TSO is propagated for devices that announce their ability to
support TSO in combination with VLAN accel by setting the NETIF_F_VLAN_TSO
flag.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2008-05-20 14:54:50 -07:00
committed by David S. Miller
parent 7ff6e6f779
commit 5fb1357054
4 changed files with 41 additions and 2 deletions

View File

@@ -663,6 +663,11 @@ static int vlan_dev_init(struct net_device *dev)
(1<<__LINK_STATE_DORMANT))) |
(1<<__LINK_STATE_PRESENT);
if (real_dev->features & NETIF_F_VLAN_TSO)
dev->features |= real_dev->features & VLAN_TSO_FEATURES;
if (real_dev->features & NETIF_F_VLAN_CSUM)
dev->features |= real_dev->features & NETIF_F_ALL_CSUM;
/* ipv6 shared card related stuff */
dev->dev_id = real_dev->dev_id;