aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-06-29 12:51:40 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-30 22:46:43 -0400
commita22d2b36a2c4ca58c5914072a88704377bbd34f8 (patch)
tree683d53b06ce1bfb579edd6a0bddc81ae6fbb3b11 /drivers/net/usb
parent9612101cb33862cc160069cc8423926d61db51f8 (diff)
net1080: Use netdev stats structure
Now that netdev has its own stats structure we should use that instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/net1080.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 034e8a73ca6..aeb1ab03a9e 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -433,7 +433,7 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
433 dbg("rx framesize %d range %d..%d mtu %d", skb->len, 433 dbg("rx framesize %d range %d..%d mtu %d", skb->len,
434 net->hard_header_len, dev->hard_mtu, net->mtu); 434 net->hard_header_len, dev->hard_mtu, net->mtu);
435#endif 435#endif
436 dev->stats.rx_frame_errors++; 436 dev->net->stats.rx_frame_errors++;
437 nc_ensure_sync(dev); 437 nc_ensure_sync(dev);
438 return 0; 438 return 0;
439 } 439 }
@@ -442,12 +442,12 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
442 hdr_len = le16_to_cpup(&header->hdr_len); 442 hdr_len = le16_to_cpup(&header->hdr_len);
443 packet_len = le16_to_cpup(&header->packet_len); 443 packet_len = le16_to_cpup(&header->packet_len);
444 if (FRAMED_SIZE(packet_len) > NC_MAX_PACKET) { 444 if (FRAMED_SIZE(packet_len) > NC_MAX_PACKET) {
445 dev->stats.rx_frame_errors++; 445 dev->net->stats.rx_frame_errors++;
446 dbg("packet too big, %d", packet_len); 446 dbg("packet too big, %d", packet_len);
447 nc_ensure_sync(dev); 447 nc_ensure_sync(dev);
448 return 0; 448 return 0;
449 } else if (hdr_len < MIN_HEADER) { 449 } else if (hdr_len < MIN_HEADER) {
450 dev->stats.rx_frame_errors++; 450 dev->net->stats.rx_frame_errors++;
451 dbg("header too short, %d", hdr_len); 451 dbg("header too short, %d", hdr_len);
452 nc_ensure_sync(dev); 452 nc_ensure_sync(dev);
453 return 0; 453 return 0;
@@ -465,21 +465,21 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
465 465
466 if ((packet_len & 0x01) == 0) { 466 if ((packet_len & 0x01) == 0) {
467 if (skb->data [packet_len] != PAD_BYTE) { 467 if (skb->data [packet_len] != PAD_BYTE) {
468 dev->stats.rx_frame_errors++; 468 dev->net->stats.rx_frame_errors++;
469 dbg("bad pad"); 469 dbg("bad pad");
470 return 0; 470 return 0;
471 } 471 }
472 skb_trim(skb, skb->len - 1); 472 skb_trim(skb, skb->len - 1);
473 } 473 }
474 if (skb->len != packet_len) { 474 if (skb->len != packet_len) {
475 dev->stats.rx_frame_errors++; 475 dev->net->stats.rx_frame_errors++;
476 dbg("bad packet len %d (expected %d)", 476 dbg("bad packet len %d (expected %d)",
477 skb->len, packet_len); 477 skb->len, packet_len);
478 nc_ensure_sync(dev); 478 nc_ensure_sync(dev);
479 return 0; 479 return 0;
480 } 480 }
481 if (header->packet_id != get_unaligned(&trailer->packet_id)) { 481 if (header->packet_id != get_unaligned(&trailer->packet_id)) {
482 dev->stats.rx_fifo_errors++; 482 dev->net->stats.rx_fifo_errors++;
483 dbg("(2+ dropped) rx packet_id mismatch 0x%x 0x%x", 483 dbg("(2+ dropped) rx packet_id mismatch 0x%x 0x%x",
484 le16_to_cpu(header->packet_id), 484 le16_to_cpu(header->packet_id),
485 le16_to_cpu(trailer->packet_id)); 485 le16_to_cpu(trailer->packet_id));