kernel_samsung_a53x/net/ethtool
Kory Maincent 1a2632b97e ethtool: Fix wrong mod state in case of verbose and no_mask bitset
[ Upstream commit 910c4788d6155b2202ec88273376cd7ecdc24f0a ]

A bitset without mask in a _SET request means we want exactly the bits in
the bitset to be set. This works correctly for compact format but when
verbose format is parsed, ethnl_update_bitset32_verbose() only sets the
bits present in the request bitset but does not clear the rest. The commit
6699170376ab ("ethtool: fix application of verbose no_mask bitset") fixes
this issue by clearing the whole target bitmap before we start iterating.
The solution proposed brought an issue with the behavior of the mod
variable. As the bitset is always cleared the old value will always
differ to the new value.

Fix it by adding a new function to compare bitmaps and a temporary variable
which save the state of the old bitmap.

Fixes: 6699170376ab ("ethtool: fix application of verbose no_mask bitset")
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20241202153358.1142095-1-kory.maincent@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:27 +01:00
..
bitset.c ethtool: Fix wrong mod state in case of verbose and no_mask bitset 2024-12-17 13:24:27 +01:00
bitset.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cabletest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
channels.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coalesce.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.c net: introduce a netdev feature for UDP GRO forwarding 2024-12-17 13:24:15 +01:00
common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eee.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
features.c ethtool: netlink: Add missing ethnl_ops_begin/complete 2024-11-18 12:12:51 +01:00
ioctl.c Revert "ethtool: check device is present when getting link settings" 2024-11-24 00:23:49 +01:00
linkinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linkmodes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linkstate.c ethtool: netlink: do not return SQI value if link is down 2024-11-19 14:19:43 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pause.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privflags.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rings.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
strset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tsinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tunnels.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wol.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00