mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
net: dlink: fix multicast stats being counted incorrectly
`McstFramesRcvdOk` counts the number of received multicast packets, and
it reports the value correctly.
However, reading `McstFramesRcvdOk` clears the register to zero. As a
result, the driver was reporting only the packets since the last read,
instead of the accumulated total.
Fix this by updating the multicast statistics accumulatively instaed of
instantaneously.
Fixes: 1da177e4c3
("Linux-2.6.12-rc2")
Tested-on: D-Link DGE-550T Rev-A3
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250823182927.6063-3-yyyynoom@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
97766512a9
commit
007a5ffadc
1 changed files with 1 additions and 1 deletions
|
@ -1099,7 +1099,7 @@ get_stats (struct net_device *dev)
|
|||
dev->stats.rx_bytes += dr32(OctetRcvOk);
|
||||
dev->stats.tx_bytes += dr32(OctetXmtOk);
|
||||
|
||||
dev->stats.multicast = dr32(McstFramesRcvdOk);
|
||||
dev->stats.multicast += dr32(McstFramesRcvdOk);
|
||||
dev->stats.collisions += dr32(SingleColFrames)
|
||||
+ dr32(MultiColFrames);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue