mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 00:38:55 +00:00
net: systemport: Fix software statistics for SYSTEMPORT Lite
With SYSTEMPORT Lite we have holes in our statistics layout that make us skip over the hardware MIB counters, bcm_sysport_get_stats() was not taking that into account resulting in reporting 0 for all SW-maintained statistics, fix this by skipping accordingly. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ed43594aed
commit
50ddfbafcd
@ -449,6 +449,10 @@ static void bcm_sysport_get_stats(struct net_device *dev,
|
||||
p = (char *)&dev->stats;
|
||||
else
|
||||
p = (char *)priv;
|
||||
|
||||
if (priv->is_lite && !bcm_sysport_lite_stat_valid(s->type))
|
||||
continue;
|
||||
|
||||
p += s->stat_offset;
|
||||
data[j] = *(unsigned long *)p;
|
||||
j++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user