summaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 23:13:53 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-08 23:13:53 -0700
commitc773e847ea8f6812804e40f52399c6921a00eab1 (patch)
tree952e0e262cc0b0f2136bc2a62938ae1d186f896a /net/8021q
parenteb6aafe3f843cb0e939546c03540a3b4911b6964 (diff)
downloadblackbird-op-linux-c773e847ea8f6812804e40f52399c6921a00eab1.tar.gz
blackbird-op-linux-c773e847ea8f6812804e40f52399c6921a00eab1.zip
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')
-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)
*/
static struct lock_class_key vlan_netdev_xmit_lock_key;
+static void vlan_dev_set_lockdep_one(struct netdev_queue *txq,
+ int subclass)
+{
+ lockdep_set_class_and_subclass(&txq->_xmit_lock,
+ &vlan_netdev_xmit_lock_key, subclass);
+}
+
+static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass)
+{
+ vlan_dev_set_lockdep_one(&dev->tx_queue, subclass);
+}
+
static const struct header_ops vlan_header_ops = {
.create = vlan_dev_hard_header,
.rebuild = vlan_dev_rebuild_header,
@@ -668,8 +680,7 @@ static int vlan_dev_init(struct net_device *dev)
if (is_vlan_dev(real_dev))
subclass = 1;
- lockdep_set_class_and_subclass(&dev->_xmit_lock,
- &vlan_netdev_xmit_lock_key, subclass);
+ vlan_dev_set_lockdep_class(dev, subclass);
return 0;
}
OpenPOWER on IntegriCloud