diff options
Diffstat (limited to 'drivers/net/chelsio/cxgb2.c')
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 50 |
1 files changed, 10 insertions, 40 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index c3b1648618c8..7d0f24f69777 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -454,51 +454,21 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats, | |||
454 | const struct cmac_statistics *s; | 454 | const struct cmac_statistics *s; |
455 | const struct sge_intr_counts *t; | 455 | const struct sge_intr_counts *t; |
456 | struct sge_port_stats ss; | 456 | struct sge_port_stats ss; |
457 | unsigned int len; | ||
457 | 458 | ||
458 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); | 459 | s = mac->ops->statistics_update(mac, MAC_STATS_UPDATE_FULL); |
459 | 460 | ||
460 | *data++ = s->TxOctetsOK; | 461 | len = sizeof(u64)*(&s->TxFCSErrors + 1 - &s->TxOctetsOK); |
461 | *data++ = s->TxOctetsBad; | 462 | memcpy(data, &s->TxOctetsOK, len); |
462 | *data++ = s->TxUnicastFramesOK; | 463 | data += len; |
463 | *data++ = s->TxMulticastFramesOK; | 464 | |
464 | *data++ = s->TxBroadcastFramesOK; | 465 | len = sizeof(u64)*(&s->RxFrameTooLongErrors + 1 - &s->RxOctetsOK); |
465 | *data++ = s->TxPauseFrames; | 466 | memcpy(data, &s->RxOctetsOK, len); |
466 | *data++ = s->TxFramesWithDeferredXmissions; | 467 | data += len; |
467 | *data++ = s->TxLateCollisions; | ||
468 | *data++ = s->TxTotalCollisions; | ||
469 | *data++ = s->TxFramesAbortedDueToXSCollisions; | ||
470 | *data++ = s->TxUnderrun; | ||
471 | *data++ = s->TxLengthErrors; | ||
472 | *data++ = s->TxInternalMACXmitError; | ||
473 | *data++ = s->TxFramesWithExcessiveDeferral; | ||
474 | *data++ = s->TxFCSErrors; | ||
475 | |||
476 | *data++ = s->RxOctetsOK; | ||
477 | *data++ = s->RxOctetsBad; | ||
478 | *data++ = s->RxUnicastFramesOK; | ||
479 | *data++ = s->RxMulticastFramesOK; | ||
480 | *data++ = s->RxBroadcastFramesOK; | ||
481 | *data++ = s->RxPauseFrames; | ||
482 | *data++ = s->RxFCSErrors; | ||
483 | *data++ = s->RxAlignErrors; | ||
484 | *data++ = s->RxSymbolErrors; | ||
485 | *data++ = s->RxDataErrors; | ||
486 | *data++ = s->RxSequenceErrors; | ||
487 | *data++ = s->RxRuntErrors; | ||
488 | *data++ = s->RxJabberErrors; | ||
489 | *data++ = s->RxInternalMACRcvError; | ||
490 | *data++ = s->RxInRangeLengthErrors; | ||
491 | *data++ = s->RxOutOfRangeLengthField; | ||
492 | *data++ = s->RxFrameTooLongErrors; | ||
493 | 468 | ||
494 | t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); | 469 | t1_sge_get_port_stats(adapter->sge, dev->if_port, &ss); |
495 | *data++ = ss.rx_packets; | 470 | memcpy(data, &ss, sizeof(ss)); |
496 | *data++ = ss.rx_cso_good; | 471 | data += sizeof(ss); |
497 | *data++ = ss.tx_packets; | ||
498 | *data++ = ss.tx_cso; | ||
499 | *data++ = ss.tx_tso; | ||
500 | *data++ = ss.vlan_xtract; | ||
501 | *data++ = ss.vlan_insert; | ||
502 | 472 | ||
503 | t = t1_sge_get_intr_counts(adapter->sge); | 473 | t = t1_sge_get_intr_counts(adapter->sge); |
504 | *data++ = t->rx_drops; | 474 | *data++ = t->rx_drops; |