]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: fix software maintained statistics
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 1 Mar 2015 02:09:16 +0000 (18:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Mar 2015 19:02:11 +0000 (14:02 -0500)
commit717c34182a8bcfca1ebf3e54200a8e4ffae2b156
treea4c721eb73eb3214f4a555164f763d3ddf5abf2c
parent849ba5a6a08f9992666b7f4435e9dd08eb049b61
net: bcmgenet: fix software maintained statistics

Commit 73e03cb152a4 ("net: bcmgenet: log RX buffer allocation and RX/TX dma
failures") added a few software maintained statistics using
BCMGENET_STAT_MIB_RX and BCMGENET_STAT_MIB_TX. These statistics are read from
the hardware MIB counters, such that bcmgenet_update_mib_counters() was trying
to read from a non-existing MIB offset for these counters.

Fix this by introducing a special type: BCMGENET_STAT_SOFT, similar to
BCMGENET_STAT_NETDEV, such that bcmgenet_get_ethtool_stats will read from the
software mib.

Fixes: 73e03cb152a4 ("net: bcmgenet: log RX buffer allocation and RX/TX dma failures")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c