aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e100.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-02-17 08:44:23 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-03-02 21:07:52 -0500
commitd24d65eda97fe51f2996538148e85d309e2460e4 (patch)
tree997ee633a60a2c945c02f4c35dd831fa02356d54 /drivers/net/ethernet/intel/e100.c
parentb4017c5368f992fb8fb3a2545a0977082c6664e4 (diff)
e100: Fix rx-over-length statistics.
The old code would += the total errors every time stats were gathered. Instead, keep a count of short-pkt and long-pkt counters and then simply add them together for the rx-over-length stat. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e100.c')
-rw-r--r--drivers/net/ethernet/intel/e100.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 4d8a616fe9cd..d2b78722fc32 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -622,6 +622,7 @@ struct nic {
622 u32 rx_fc_pause; 622 u32 rx_fc_pause;
623 u32 rx_fc_unsupported; 623 u32 rx_fc_unsupported;
624 u32 rx_tco_frames; 624 u32 rx_tco_frames;
625 u32 rx_short_frame_errors;
625 u32 rx_over_length_errors; 626 u32 rx_over_length_errors;
626 627
627 u16 eeprom_wc; 628 u16 eeprom_wc;
@@ -1622,7 +1623,9 @@ static void e100_update_stats(struct nic *nic)
1622 ns->collisions += nic->tx_collisions; 1623 ns->collisions += nic->tx_collisions;
1623 ns->tx_errors += le32_to_cpu(s->tx_max_collisions) + 1624 ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
1624 le32_to_cpu(s->tx_lost_crs); 1625 le32_to_cpu(s->tx_lost_crs);
1625 ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) + 1626 nic->rx_short_frame_errors +=
1627 le32_to_cpu(s->rx_short_frame_errors);
1628 ns->rx_length_errors = nic->rx_short_frame_errors +
1626 nic->rx_over_length_errors; 1629 nic->rx_over_length_errors;
1627 ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors); 1630 ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
1628 ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors); 1631 ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);