diff options
author | Kory Maincent <kory.maincent@bootlin.com> | 2024-12-02 16:33:57 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-04 18:54:43 -0800 |
commit | 910c4788d6155b2202ec88273376cd7ecdc24f0a (patch) | |
tree | 8e52f4a5eaf6b21045da152f49a644848a29a90a /drivers | |
parent | 50b94204446e1215af081fd713d7d566d9258e35 (diff) |
ethtool: Fix wrong mod state in case of verbose and no_mask bitset
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>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions