diff options
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r-- | drivers/net/usb/usbnet.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 8a22ff67b026..d9eea8cfe6cb 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -315,6 +315,7 @@ static void __usbnet_status_stop_force(struct usbnet *dev) | |||
315 | void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) | 315 | void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) |
316 | { | 316 | { |
317 | struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64); | 317 | struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64); |
318 | unsigned long flags; | ||
318 | int status; | 319 | int status; |
319 | 320 | ||
320 | if (test_bit(EVENT_RX_PAUSED, &dev->flags)) { | 321 | if (test_bit(EVENT_RX_PAUSED, &dev->flags)) { |
@@ -326,10 +327,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) | |||
326 | if (skb->protocol == 0) | 327 | if (skb->protocol == 0) |
327 | skb->protocol = eth_type_trans (skb, dev->net); | 328 | skb->protocol = eth_type_trans (skb, dev->net); |
328 | 329 | ||
329 | u64_stats_update_begin(&stats64->syncp); | 330 | flags = u64_stats_update_begin_irqsave(&stats64->syncp); |
330 | stats64->rx_packets++; | 331 | stats64->rx_packets++; |
331 | stats64->rx_bytes += skb->len; | 332 | stats64->rx_bytes += skb->len; |
332 | u64_stats_update_end(&stats64->syncp); | 333 | u64_stats_update_end_irqrestore(&stats64->syncp, flags); |
333 | 334 | ||
334 | netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", | 335 | netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", |
335 | skb->len + sizeof (struct ethhdr), skb->protocol); | 336 | skb->len + sizeof (struct ethhdr), skb->protocol); |
@@ -1248,11 +1249,12 @@ static void tx_complete (struct urb *urb) | |||
1248 | 1249 | ||
1249 | if (urb->status == 0) { | 1250 | if (urb->status == 0) { |
1250 | struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64); | 1251 | struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64); |
1252 | unsigned long flags; | ||
1251 | 1253 | ||
1252 | u64_stats_update_begin(&stats64->syncp); | 1254 | flags = u64_stats_update_begin_irqsave(&stats64->syncp); |
1253 | stats64->tx_packets += entry->packets; | 1255 | stats64->tx_packets += entry->packets; |
1254 | stats64->tx_bytes += entry->length; | 1256 | stats64->tx_bytes += entry->length; |
1255 | u64_stats_update_end(&stats64->syncp); | 1257 | u64_stats_update_end_irqrestore(&stats64->syncp, flags); |
1256 | } else { | 1258 | } else { |
1257 | dev->net->stats.tx_errors++; | 1259 | dev->net->stats.tx_errors++; |
1258 | 1260 | ||