Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6517eb59 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: bcmgenet: device stats are unsigned long



On 64bit kernels, device stats are 64bit wide, not 32bit.

Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf6b5fb2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -878,6 +878,10 @@ static void bcmgenet_get_ethtool_stats(struct net_device *dev,
		else
			p = (char *)priv;
		p += s->stat_offset;
		if (sizeof(unsigned long) != sizeof(u32) &&
		    s->stat_sizeof == sizeof(unsigned long))
			data[i] = *(unsigned long *)p;
		else
			data[i] = *(u32 *)p;
	}
}