diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 23:13:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 23:13:53 -0700 |
commit | c773e847ea8f6812804e40f52399c6921a00eab1 (patch) | |
tree | 952e0e262cc0b0f2136bc2a62938ae1d186f896a /drivers/net/macvlan.c | |
parent | eb6aafe3f843cb0e939546c03540a3b4911b6964 (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 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index c36a03ae9bfb..c02ceaa4a216 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -277,6 +277,17 @@ static struct lock_class_key macvlan_netdev_xmit_lock_key; #define MACVLAN_STATE_MASK \ ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT)) +static void macvlan_set_lockdep_class_one(struct netdev_queue *txq) +{ + lockdep_set_class(&txq->_xmit_lock, + &macvlan_netdev_xmit_lock_key); +} + +static void macvlan_set_lockdep_class(struct net_device *dev) +{ + macvlan_set_lockdep_class_one(&dev->tx_queue); +} + static int macvlan_init(struct net_device *dev) { struct macvlan_dev *vlan = netdev_priv(dev); @@ -287,7 +298,8 @@ static int macvlan_init(struct net_device *dev) dev->features = lowerdev->features & MACVLAN_FEATURES; dev->iflink = lowerdev->ifindex; - lockdep_set_class(&dev->_xmit_lock, &macvlan_netdev_xmit_lock_key); + macvlan_set_lockdep_class(dev); + return 0; } |