]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dlink: fix multicast stats being counted incorrectly
authorYeounsu Moon <yyyynoom@gmail.com>
Sat, 23 Aug 2025 18:29:24 +0000 (03:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:30:23 +0000 (15:30 +0200)
commitb3c70f6fc25804a50f05a860d72cc5a0583eb6db
tree4d13f863edee1a6f90a6fc2e722f32c737a55eb2
parent589edd3dc8fb67e3bbb9a5af930574ec518c0063
net: dlink: fix multicast stats being counted incorrectly

[ Upstream commit 007a5ffadc4fd51739527f1503b7cf048f31c413 ]

`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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/dlink/dl2k.c