diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index b6e52c025fd8..8efa399823e3 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -627,6 +627,18 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) | |||
627 | */ | 627 | */ |
628 | static struct lock_class_key vlan_netdev_xmit_lock_key; | 628 | static struct lock_class_key vlan_netdev_xmit_lock_key; |
629 | 629 | ||
630 | static void vlan_dev_set_lockdep_one(struct netdev_queue *txq, | ||
631 | int subclass) | ||
632 | { | ||
633 | lockdep_set_class_and_subclass(&txq->_xmit_lock, | ||
634 | &vlan_netdev_xmit_lock_key, subclass); | ||
635 | } | ||
636 | |||
637 | static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass) | ||
638 | { | ||
639 | vlan_dev_set_lockdep_one(&dev->tx_queue, subclass); | ||
640 | } | ||
641 | |||
630 | static const struct header_ops vlan_header_ops = { | 642 | static const struct header_ops vlan_header_ops = { |
631 | .create = vlan_dev_hard_header, | 643 | .create = vlan_dev_hard_header, |
632 | .rebuild = vlan_dev_rebuild_header, | 644 | .rebuild = vlan_dev_rebuild_header, |
@@ -668,8 +680,7 @@ static int vlan_dev_init(struct net_device *dev) | |||
668 | if (is_vlan_dev(real_dev)) | 680 | if (is_vlan_dev(real_dev)) |
669 | subclass = 1; | 681 | subclass = 1; |
670 | 682 | ||
671 | lockdep_set_class_and_subclass(&dev->_xmit_lock, | 683 | vlan_dev_set_lockdep_class(dev, subclass); |
672 | &vlan_netdev_xmit_lock_key, subclass); | ||
673 | return 0; | 684 | return 0; |
674 | } | 685 | } |
675 | 686 | ||