diff options
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index fe649081fbdc..8836575f9d79 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id) | |||
225 | return -EOPNOTSUPP; | 225 | return -EOPNOTSUPP; |
226 | } | 226 | } |
227 | 227 | ||
228 | /* The real device must be up and operating in order to | ||
229 | * assosciate a VLAN device with it. | ||
230 | */ | ||
231 | if (!(real_dev->flags & IFF_UP)) | ||
232 | return -ENETDOWN; | ||
233 | |||
234 | if (__find_vlan_dev(real_dev, vlan_id) != NULL) | 228 | if (__find_vlan_dev(real_dev, vlan_id) != NULL) |
235 | return -EEXIST; | 229 | return -EEXIST; |
236 | 230 | ||
@@ -336,12 +330,13 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) | |||
336 | snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); | 330 | snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id); |
337 | } | 331 | } |
338 | 332 | ||
339 | new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, | 333 | new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name, |
340 | vlan_setup); | 334 | vlan_setup, real_dev->num_tx_queues); |
341 | 335 | ||
342 | if (new_dev == NULL) | 336 | if (new_dev == NULL) |
343 | return -ENOBUFS; | 337 | return -ENOBUFS; |
344 | 338 | ||
339 | new_dev->real_num_tx_queues = real_dev->real_num_tx_queues; | ||
345 | dev_net_set(new_dev, net); | 340 | dev_net_set(new_dev, net); |
346 | /* need 4 bytes for extra VLAN header info, | 341 | /* need 4 bytes for extra VLAN header info, |
347 | * hope the underlying device can handle it. | 342 | * hope the underlying device can handle it. |
@@ -397,6 +392,9 @@ static void vlan_transfer_features(struct net_device *dev, | |||
397 | vlandev->features &= ~dev->vlan_features; | 392 | vlandev->features &= ~dev->vlan_features; |
398 | vlandev->features |= dev->features & dev->vlan_features; | 393 | vlandev->features |= dev->features & dev->vlan_features; |
399 | vlandev->gso_max_size = dev->gso_max_size; | 394 | vlandev->gso_max_size = dev->gso_max_size; |
395 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | ||
396 | vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; | ||
397 | #endif | ||
400 | 398 | ||
401 | if (old_features != vlandev->features) | 399 | if (old_features != vlandev->features) |
402 | netdev_features_change(vlandev); | 400 | netdev_features_change(vlandev); |
@@ -468,6 +466,19 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
468 | } | 466 | } |
469 | break; | 467 | break; |
470 | 468 | ||
469 | case NETDEV_CHANGEMTU: | ||
470 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | ||
471 | vlandev = vlan_group_get_device(grp, i); | ||
472 | if (!vlandev) | ||
473 | continue; | ||
474 | |||
475 | if (vlandev->mtu <= dev->mtu) | ||
476 | continue; | ||
477 | |||
478 | dev_set_mtu(vlandev, dev->mtu); | ||
479 | } | ||
480 | break; | ||
481 | |||
471 | case NETDEV_FEAT_CHANGE: | 482 | case NETDEV_FEAT_CHANGE: |
472 | /* Propagate device features to underlying device */ | 483 | /* Propagate device features to underlying device */ |
473 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 484 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { |