aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 02:13:53 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-09 02:13:53 -0400
commitc773e847ea8f6812804e40f52399c6921a00eab1 (patch)
tree952e0e262cc0b0f2136bc2a62938ae1d186f896a /net/8021q/vlan_dev.c
parenteb6aafe3f843cb0e939546c03540a3b4911b6964 (diff)
netdev: Move _xmit_lock and xmit_lock_owner into netdev_queue.
Accesses are mostly structured such that when there are multiple TX queues the code transformations will be a little bit simpler. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c15
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 */
628static struct lock_class_key vlan_netdev_xmit_lock_key; 628static struct lock_class_key vlan_netdev_xmit_lock_key;
629 629
630static 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
637static 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
630static const struct header_ops vlan_header_ops = { 642static 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