diff options
Diffstat (limited to 'drivers/net/loopback.c')
| -rw-r--r-- | drivers/net/loopback.c | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index a17d85a331f..bb96409f8c0 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -39,7 +39,6 @@  #include <linux/errno.h>  #include <linux/fcntl.h>  #include <linux/in.h> -#include <linux/init.h>  #include <asm/uaccess.h>  #include <asm/io.h> @@ -112,10 +111,10 @@ static struct rtnl_link_stats64 *loopback_get_stats64(struct net_device *dev,  		lb_stats = per_cpu_ptr(dev->lstats, i);  		do { -			start = u64_stats_fetch_begin_bh(&lb_stats->syncp); +			start = u64_stats_fetch_begin_irq(&lb_stats->syncp);  			tbytes = lb_stats->bytes;  			tpackets = lb_stats->packets; -		} while (u64_stats_fetch_retry_bh(&lb_stats->syncp, start)); +		} while (u64_stats_fetch_retry_irq(&lb_stats->syncp, start));  		bytes   += tbytes;  		packets += tpackets;  	} @@ -137,10 +136,9 @@ static const struct ethtool_ops loopback_ethtool_ops = {  static int loopback_dev_init(struct net_device *dev)  { -	dev->lstats = alloc_percpu(struct pcpu_lstats); +	dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);  	if (!dev->lstats)  		return -ENOMEM; -  	return 0;  } @@ -155,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,  };  /* @@ -169,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 @@ -176,6 +176,7 @@ static void loopback_setup(struct net_device *dev)  		| NETIF_F_UFO  		| NETIF_F_HW_CSUM  		| NETIF_F_RXCSUM +		| NETIF_F_SCTP_CSUM  		| NETIF_F_HIGHDMA  		| NETIF_F_LLTX  		| NETIF_F_NETNS_LOCAL  | 
