aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-09-10 02:41:00 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-10 15:27:29 -0400
commit1cdc2cfc8af6d1045c844b9e24a7910b57232065 (patch)
tree1e285f5ab1089fc936839693de40af5da1b180ff
parente548833df83c3554229eff0672900bfe958b45fd (diff)
sfc: Use MCDI RX_BAD_FCS_PKTS count as MAC rx_bad count
Calculating rx_bad as rx_packets - rx_good is unnecessary and incorrect, since rx_good does not include control frames (e.g. pause frames) and rx_packets does. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/sfc/siena.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
index 3fab030f8ab5..9f5368049694 100644
--- a/drivers/net/sfc/siena.c
+++ b/drivers/net/sfc/siena.c
@@ -450,7 +450,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
450 mac_stats->rx_bad_bytes); 450 mac_stats->rx_bad_bytes);
451 MAC_STAT(rx_packets, RX_PKTS); 451 MAC_STAT(rx_packets, RX_PKTS);
452 MAC_STAT(rx_good, RX_GOOD_PKTS); 452 MAC_STAT(rx_good, RX_GOOD_PKTS);
453 mac_stats->rx_bad = mac_stats->rx_packets - mac_stats->rx_good; 453 MAC_STAT(rx_bad, RX_BAD_FCS_PKTS);
454 MAC_STAT(rx_pause, RX_PAUSE_PKTS); 454 MAC_STAT(rx_pause, RX_PAUSE_PKTS);
455 MAC_STAT(rx_control, RX_CONTROL_PKTS); 455 MAC_STAT(rx_control, RX_CONTROL_PKTS);
456 MAC_STAT(rx_unicast, RX_UNICAST_PKTS); 456 MAC_STAT(rx_unicast, RX_UNICAST_PKTS);