diff options
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; | |||
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 | ||
280 | static 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 | |||
286 | static void macvlan_set_lockdep_class(struct net_device *dev) | ||
287 | { | ||
288 | macvlan_set_lockdep_class_one(&dev->tx_queue); | ||
289 | } | ||
290 | |||
280 | static int macvlan_init(struct net_device *dev) | 291 | static 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 | ||