Skip to content

Commit

Permalink
[TG3]: Do not count non-error frames dropped by the hardware as rx_er…
Browse files Browse the repository at this point in the history
…rors.

Instead, count them as part of rx_missed_errors.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John W. Linville authored and David S. Miller committed Sep 12, 2005
1 parent b88a762 commit 4f63b87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev)
get_stat64(&hw_stats->tx_octets);

stats->rx_errors = old_stats->rx_errors +
get_stat64(&hw_stats->rx_errors) +
get_stat64(&hw_stats->rx_discards);
get_stat64(&hw_stats->rx_errors);
stats->tx_errors = old_stats->tx_errors +
get_stat64(&hw_stats->tx_errors) +
get_stat64(&hw_stats->tx_mac_errors) +
Expand Down Expand Up @@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev)
stats->rx_crc_errors = old_stats->rx_crc_errors +
calc_crc_errors(tp);

stats->rx_missed_errors = old_stats->rx_missed_errors +
get_stat64(&hw_stats->rx_discards);

return stats;
}

Expand Down

0 comments on commit 4f63b87

Please sign in to comment.