diff options
-rw-r--r-- | net/8021q/vlan.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 4add9bd4bc8d..032bf44eca5e 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -323,6 +323,7 @@ static const struct header_ops vlan_header_ops = { | |||
323 | static int vlan_dev_init(struct net_device *dev) | 323 | static int vlan_dev_init(struct net_device *dev) |
324 | { | 324 | { |
325 | struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; | 325 | struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; |
326 | int subclass = 0; | ||
326 | 327 | ||
327 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ | 328 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ |
328 | dev->flags = real_dev->flags & ~IFF_UP; | 329 | dev->flags = real_dev->flags & ~IFF_UP; |
@@ -349,7 +350,11 @@ static int vlan_dev_init(struct net_device *dev) | |||
349 | dev->hard_start_xmit = vlan_dev_hard_start_xmit; | 350 | dev->hard_start_xmit = vlan_dev_hard_start_xmit; |
350 | } | 351 | } |
351 | 352 | ||
352 | lockdep_set_class(&dev->_xmit_lock, &vlan_netdev_xmit_lock_key); | 353 | if (real_dev->priv_flags & IFF_802_1Q_VLAN) |
354 | subclass = 1; | ||
355 | |||
356 | lockdep_set_class_and_subclass(&dev->_xmit_lock, | ||
357 | &vlan_netdev_xmit_lock_key, subclass); | ||
353 | return 0; | 358 | return 0; |
354 | } | 359 | } |
355 | 360 | ||