aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.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 /drivers/net/macvlan.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 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c14
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;
277#define MACVLAN_STATE_MASK \ 277#define MACVLAN_STATE_MASK \
278 ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT)) 278 ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))
279 279
280static void macvlan_set_lockdep_class_one(struct netdev_queue *txq)
281{
282 lockdep_set_class(&txq->_xmit_lock,
283 &macvlan_netdev_xmit_lock_key);
284}
285
286static void macvlan_set_lockdep_class(struct net_device *dev)
287{
288 macvlan_set_lockdep_class_one(&dev->tx_queue);
289}
290
280static int macvlan_init(struct net_device *dev) 291static int macvlan_init(struct net_device *dev)
281{ 292{
282 struct macvlan_dev *vlan = netdev_priv(dev); 293 struct macvlan_dev *vlan = netdev_priv(dev);
@@ -287,7 +298,8 @@ static int macvlan_init(struct net_device *dev)
287 dev->features = lowerdev->features & MACVLAN_FEATURES; 298 dev->features = lowerdev->features & MACVLAN_FEATURES;
288 dev->iflink = lowerdev->ifindex; 299 dev->iflink = lowerdev->ifindex;
289 300
290 lockdep_set_class(&dev->_xmit_lock, &macvlan_netdev_xmit_lock_key); 301 macvlan_set_lockdep_class(dev);
302
291 return 0; 303 return 0;
292} 304}
293 305