Skip to content

Commit 007a5ff

Browse files
Cruzer-Skuba-moo
authored andcommitted
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: 1da177e4c3f4 ("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>
1 parent 9776651 commit 007a5ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/dlink/dl2k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ get_stats (struct net_device *dev)
10991099
dev->stats.rx_bytes += dr32(OctetRcvOk);
11001100
dev->stats.tx_bytes += dr32(OctetXmtOk);
11011101

1102-
dev->stats.multicast = dr32(McstFramesRcvdOk);
1102+
dev->stats.multicast += dr32(McstFramesRcvdOk);
11031103
dev->stats.collisions += dr32(SingleColFrames)
11041104
+ dr32(MultiColFrames);
11051105

0 commit comments

Comments
 (0)