]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/8021q/vlan.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6
[mv-sheeva.git] / net / 8021q / vlan.c
index fe649081fbdcc192426bfc1639068110b2ba6717..8836575f9d79dcd9b28c1cfa7d01d034dde9f0c5 100644 (file)
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id)
                return -EOPNOTSUPP;
        }
 
-       /* The real device must be up and operating in order to
-        * assosciate a VLAN device with it.
-        */
-       if (!(real_dev->flags & IFF_UP))
-               return -ENETDOWN;
-
        if (__find_vlan_dev(real_dev, vlan_id) != NULL)
                return -EEXIST;
 
@@ -336,12 +330,13 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
                snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
        }
 
-       new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
-                              vlan_setup);
+       new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name,
+                                 vlan_setup, real_dev->num_tx_queues);
 
        if (new_dev == NULL)
                return -ENOBUFS;
 
+       new_dev->real_num_tx_queues = real_dev->real_num_tx_queues;
        dev_net_set(new_dev, net);
        /* need 4 bytes for extra VLAN header info,
         * hope the underlying device can handle it.
@@ -397,6 +392,9 @@ static void vlan_transfer_features(struct net_device *dev,
        vlandev->features &= ~dev->vlan_features;
        vlandev->features |= dev->features & dev->vlan_features;
        vlandev->gso_max_size = dev->gso_max_size;
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
+       vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
+#endif
 
        if (old_features != vlandev->features)
                netdev_features_change(vlandev);
@@ -468,6 +466,19 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
                }
                break;
 
+       case NETDEV_CHANGEMTU:
+               for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+                       vlandev = vlan_group_get_device(grp, i);
+                       if (!vlandev)
+                               continue;
+
+                       if (vlandev->mtu <= dev->mtu)
+                               continue;
+
+                       dev_set_mtu(vlandev, dev->mtu);
+               }
+               break;
+
        case NETDEV_FEAT_CHANGE:
                /* Propagate device features to underlying device */
                for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {