aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 52077ca22072..6e64f7c6a2e9 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -272,13 +272,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
272 snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); 272 snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
273 } 273 }
274 274
275 new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name, 275 new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, vlan_setup);
276 vlan_setup, real_dev->num_tx_queues);
277 276
278 if (new_dev == NULL) 277 if (new_dev == NULL)
279 return -ENOBUFS; 278 return -ENOBUFS;
280 279
281 netif_copy_real_num_queues(new_dev, real_dev);
282 dev_net_set(new_dev, net); 280 dev_net_set(new_dev, net);
283 /* need 4 bytes for extra VLAN header info, 281 /* need 4 bytes for extra VLAN header info,
284 * hope the underlying device can handle it. 282 * hope the underlying device can handle it.
@@ -334,12 +332,15 @@ static void vlan_transfer_features(struct net_device *dev,
334 vlandev->features &= ~dev->vlan_features; 332 vlandev->features &= ~dev->vlan_features;
335 vlandev->features |= dev->features & dev->vlan_features; 333 vlandev->features |= dev->features & dev->vlan_features;
336 vlandev->gso_max_size = dev->gso_max_size; 334 vlandev->gso_max_size = dev->gso_max_size;
335
336 if (dev->features & NETIF_F_HW_VLAN_TX)
337 vlandev->hard_header_len = dev->hard_header_len;
338 else
339 vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN;
340
337#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) 341#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
338 vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; 342 vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
339#endif 343#endif
340 vlandev->real_num_tx_queues = dev->real_num_tx_queues;
341 BUG_ON(vlandev->real_num_tx_queues > vlandev->num_tx_queues);
342
343 if (old_features != vlandev->features) 344 if (old_features != vlandev->features)
344 netdev_features_change(vlandev); 345 netdev_features_change(vlandev);
345} 346}