diff options
Diffstat (limited to 'drivers/net/nlmon.c')
| -rw-r--r-- | drivers/net/nlmon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/nlmon.c b/drivers/net/nlmon.c index b57ce5f4896..34924dfadd0 100644 --- a/drivers/net/nlmon.c +++ b/drivers/net/nlmon.c @@ -47,8 +47,7 @@ static int nlmon_change_mtu(struct net_device *dev, int new_mtu) static int nlmon_dev_init(struct net_device *dev) { - dev->lstats = alloc_percpu(struct pcpu_lstats); - + dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats); return dev->lstats == NULL ? -ENOMEM : 0; } @@ -91,10 +90,10 @@ nlmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) nl_stats = per_cpu_ptr(dev->lstats, i); do { - start = u64_stats_fetch_begin_bh(&nl_stats->syncp); + start = u64_stats_fetch_begin_irq(&nl_stats->syncp); tbytes = nl_stats->bytes; tpackets = nl_stats->packets; - } while (u64_stats_fetch_retry_bh(&nl_stats->syncp, start)); + } while (u64_stats_fetch_retry_irq(&nl_stats->syncp, start)); packets += tpackets; bytes += tbytes; @@ -137,7 +136,8 @@ static void nlmon_setup(struct net_device *dev) dev->ethtool_ops = &nlmon_ethtool_ops; dev->destructor = free_netdev; - dev->features = NETIF_F_FRAGLIST | NETIF_F_HIGHDMA; + dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | + NETIF_F_HIGHDMA | NETIF_F_LLTX; dev->flags = IFF_NOARP; /* That's rather a softlimit here, which, of course, |
