diff options
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index c5011e078e1b..771c9bfa7d31 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -136,16 +136,9 @@ static const struct ethtool_ops loopback_ethtool_ops = { static int loopback_dev_init(struct net_device *dev) { - int i; - dev->lstats = alloc_percpu(struct pcpu_lstats); + dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats); if (!dev->lstats) return -ENOMEM; - - for_each_possible_cpu(i) { - struct pcpu_lstats *lb_stats; - lb_stats = per_cpu_ptr(dev->lstats, i); - u64_stats_init(&lb_stats->syncp); - } return 0; } @@ -160,6 +153,7 @@ static const struct net_device_ops loopback_ops = { .ndo_init = loopback_dev_init, .ndo_start_xmit= loopback_xmit, .ndo_get_stats64 = loopback_get_stats64, + .ndo_set_mac_address = eth_mac_addr, }; /* @@ -174,6 +168,7 @@ static void loopback_setup(struct net_device *dev) dev->tx_queue_len = 0; dev->type = ARPHRD_LOOPBACK; /* 0x0001*/ dev->flags = IFF_LOOPBACK; + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; dev->hw_features = NETIF_F_ALL_TSO | NETIF_F_UFO; dev->features = NETIF_F_SG | NETIF_F_FRAGLIST |