• Florian Fainelli's avatar
    net: bcmgenet: fix software maintained statistics · f62ba9c1
    Florian Fainelli authored
    Commit 44c8bc3c ("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: 44c8bc3c ("net: bcmgenet: log RX buffer allocation and RX/TX dma failures")
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f62ba9c1
bcmgenet.c 76.9 KB