From: Ben Hutchings Date: Mon, 1 Sep 2008 11:46:10 +0000 (+0100) Subject: sfc: XMAC statistics fix-ups X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c264361d31bec0a444e0c4ffd40479e66eef6c15;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sfc: XMAC statistics fix-ups Exclude assumed size of RX control frames from rx_bad_bytes. Exclude assumed size of TX control frames from tx_good_bytes for consistency with rx_good_bytes. Signed-off-by: Ben Hutchings Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index 55c0d9760be8..ab114b4c3426 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c @@ -554,9 +554,11 @@ void falcon_update_stats_xmac(struct efx_nic *efx) /* Update derived statistics */ mac_stats->tx_good_bytes = - (mac_stats->tx_bytes - mac_stats->tx_bad_bytes); + (mac_stats->tx_bytes - mac_stats->tx_bad_bytes - + mac_stats->tx_control * 64); mac_stats->rx_bad_bytes = - (mac_stats->rx_bytes - mac_stats->rx_good_bytes); + (mac_stats->rx_bytes - mac_stats->rx_good_bytes - + mac_stats->rx_control * 64); } int falcon_check_xmac(struct efx_nic *efx)