]> git.ipfire.org Git - people/ms/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:10:51 +0000 (14:10 +0100)
commit8e0f5ee1f98b0d703482d6a013f8026789e619cb
tree7ecac8a66d29db13ec4a127dd58587565db3e1f9
parent001f8cee4a23a1822bad0b3eae0d16ee3cb6834c
net: bcmgenet: fix software maintained statistics

[ Upstream commit f62ba9c14b85a682b64a4c421f91de0bd2aa8538 ]

Commit 44c8bc3ce39f ("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: 44c8bc3ce39f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c