aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f7ea5bcefc2c..75b40fefc4ee 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/list.h>
12#include <linux/netdevice.h> 11#include <linux/netdevice.h>
13#include <linux/ethtool.h> 12#include <linux/ethtool.h>
14#include <linux/etherdevice.h> 13#include <linux/etherdevice.h>
@@ -30,13 +29,10 @@ struct veth_net_stats {
30 29
31struct veth_priv { 30struct veth_priv {
32 struct net_device *peer; 31 struct net_device *peer;
33 struct list_head list;
34 struct veth_net_stats *stats; 32 struct veth_net_stats *stats;
35 unsigned ip_summed; 33 unsigned ip_summed;
36}; 34};
37 35
38static LIST_HEAD(veth_list);
39
40/* 36/*
41 * ethtool interface 37 * ethtool interface
42 */ 38 */
@@ -420,11 +416,9 @@ static int veth_newlink(struct net_device *dev,
420 416
421 priv = netdev_priv(dev); 417 priv = netdev_priv(dev);
422 priv->peer = peer; 418 priv->peer = peer;
423 list_add(&priv->list, &veth_list);
424 419
425 priv = netdev_priv(peer); 420 priv = netdev_priv(peer);
426 priv->peer = dev; 421 priv->peer = dev;
427 INIT_LIST_HEAD(&priv->list);
428 return 0; 422 return 0;
429 423
430err_register_dev: 424err_register_dev:
@@ -446,13 +440,6 @@ static void veth_dellink(struct net_device *dev)
446 priv = netdev_priv(dev); 440 priv = netdev_priv(dev);
447 peer = priv->peer; 441 peer = priv->peer;
448 442
449 if (!list_empty(&priv->list))
450 list_del(&priv->list);
451
452 priv = netdev_priv(peer);
453 if (!list_empty(&priv->list))
454 list_del(&priv->list);
455
456 unregister_netdevice(dev); 443 unregister_netdevice(dev);
457 unregister_netdevice(peer); 444 unregister_netdevice(peer);
458} 445}