• Vladimir Oltean's avatar
    net: mscc: ocelot: allow ocelot_stat_layout elements with no name · 1a733bbd
    Vladimir Oltean authored
    We will add support for pMAC counters and MAC merge layer counters,
    which are only reported via the structured stats, and the current
    ocelot_get_strings() stands in our way, because it expects that the
    statistics should be placed in the data array at the same index as found
    in the ocelot_stats_layout array.
    
    That is not true. Statistics which don't have a name should not be
    exported to the unstructured ethtool -S, so we need to have different
    indices into the ocelot_stats_layout array (i) and into the data array
    (data itself).
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1a733bbd
ocelot_stats.c 22.2 KB