aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r--drivers/net/usb/usbnet.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 22c0585a0319..edfd9e10ceba 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -234,8 +234,8 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
234 int status; 234 int status;
235 235
236 skb->protocol = eth_type_trans (skb, dev->net); 236 skb->protocol = eth_type_trans (skb, dev->net);
237 dev->stats.rx_packets++; 237 dev->net->stats.rx_packets++;
238 dev->stats.rx_bytes += skb->len; 238 dev->net->stats.rx_bytes += skb->len;
239 239
240 if (netif_msg_rx_status (dev)) 240 if (netif_msg_rx_status (dev))
241 devdbg (dev, "< rx, len %zu, type 0x%x", 241 devdbg (dev, "< rx, len %zu, type 0x%x",
@@ -397,7 +397,7 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
397 if (netif_msg_rx_err (dev)) 397 if (netif_msg_rx_err (dev))
398 devdbg (dev, "drop"); 398 devdbg (dev, "drop");
399error: 399error:
400 dev->stats.rx_errors++; 400 dev->net->stats.rx_errors++;
401 skb_queue_tail (&dev->done, skb); 401 skb_queue_tail (&dev->done, skb);
402 } 402 }
403} 403}
@@ -420,8 +420,8 @@ static void rx_complete (struct urb *urb)
420 case 0: 420 case 0:
421 if (skb->len < dev->net->hard_header_len) { 421 if (skb->len < dev->net->hard_header_len) {
422 entry->state = rx_cleanup; 422 entry->state = rx_cleanup;
423 dev->stats.rx_errors++; 423 dev->net->stats.rx_errors++;
424 dev->stats.rx_length_errors++; 424 dev->net->stats.rx_length_errors++;
425 if (netif_msg_rx_err (dev)) 425 if (netif_msg_rx_err (dev))
426 devdbg (dev, "rx length %d", skb->len); 426 devdbg (dev, "rx length %d", skb->len);
427 } 427 }
@@ -433,7 +433,7 @@ static void rx_complete (struct urb *urb)
433 * storm, recovering as needed. 433 * storm, recovering as needed.
434 */ 434 */
435 case -EPIPE: 435 case -EPIPE:
436 dev->stats.rx_errors++; 436 dev->net->stats.rx_errors++;
437 usbnet_defer_kevent (dev, EVENT_RX_HALT); 437 usbnet_defer_kevent (dev, EVENT_RX_HALT);
438 // FALLTHROUGH 438 // FALLTHROUGH
439 439
@@ -451,7 +451,7 @@ static void rx_complete (struct urb *urb)
451 case -EPROTO: 451 case -EPROTO:
452 case -ETIME: 452 case -ETIME:
453 case -EILSEQ: 453 case -EILSEQ:
454 dev->stats.rx_errors++; 454 dev->net->stats.rx_errors++;
455 if (!timer_pending (&dev->delay)) { 455 if (!timer_pending (&dev->delay)) {
456 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); 456 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES);
457 if (netif_msg_link (dev)) 457 if (netif_msg_link (dev))
@@ -465,12 +465,12 @@ block:
465 465
466 /* data overrun ... flush fifo? */ 466 /* data overrun ... flush fifo? */
467 case -EOVERFLOW: 467 case -EOVERFLOW:
468 dev->stats.rx_over_errors++; 468 dev->net->stats.rx_over_errors++;
469 // FALLTHROUGH 469 // FALLTHROUGH
470 470
471 default: 471 default:
472 entry->state = rx_cleanup; 472 entry->state = rx_cleanup;
473 dev->stats.rx_errors++; 473 dev->net->stats.rx_errors++;
474 if (netif_msg_rx_err (dev)) 474 if (netif_msg_rx_err (dev))
475 devdbg (dev, "rx status %d", urb_status); 475 devdbg (dev, "rx status %d", urb_status);
476 break; 476 break;
@@ -583,8 +583,8 @@ int usbnet_stop (struct net_device *net)
583 583
584 if (netif_msg_ifdown (dev)) 584 if (netif_msg_ifdown (dev))
585 devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld", 585 devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
586 dev->stats.rx_packets, dev->stats.tx_packets, 586 net->stats.rx_packets, net->stats.tx_packets,
587 dev->stats.rx_errors, dev->stats.tx_errors 587 net->stats.rx_errors, net->stats.tx_errors
588 ); 588 );
589 589
590 // ensure there are no more active urbs 590 // ensure there are no more active urbs
@@ -891,10 +891,10 @@ static void tx_complete (struct urb *urb)
891 struct usbnet *dev = entry->dev; 891 struct usbnet *dev = entry->dev;
892 892
893 if (urb->status == 0) { 893 if (urb->status == 0) {
894 dev->stats.tx_packets++; 894 dev->net->stats.tx_packets++;
895 dev->stats.tx_bytes += entry->length; 895 dev->net->stats.tx_bytes += entry->length;
896 } else { 896 } else {
897 dev->stats.tx_errors++; 897 dev->net->stats.tx_errors++;
898 898
899 switch (urb->status) { 899 switch (urb->status) {
900 case -EPIPE: 900 case -EPIPE:
@@ -1020,7 +1020,7 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
1020 devdbg (dev, "drop, code %d", retval); 1020 devdbg (dev, "drop, code %d", retval);
1021drop: 1021drop:
1022 retval = NET_XMIT_SUCCESS; 1022 retval = NET_XMIT_SUCCESS;
1023 dev->stats.tx_dropped++; 1023 dev->net->stats.tx_dropped++;
1024 if (skb) 1024 if (skb)
1025 dev_kfree_skb_any (skb); 1025 dev_kfree_skb_any (skb);
1026 usb_free_urb (urb); 1026 usb_free_urb (urb);