]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: rtl931x: fix and cleanup CMU functions
authorJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 25 Jan 2026 19:35:44 +0000 (19:35 +0000)
committerRobert Marko <robimarko@gmail.com>
Tue, 27 Jan 2026 08:22:10 +0000 (09:22 +0100)
commit48ada316f25fcd7571ada92190a73aa6abdcb584
tree7036e8f47b895e6fee2d271305f6ee204810761f
parenta477315f7e0baf76d36b6c748b464e4129f23cc7
realtek: pcs: rtl931x: fix and cleanup CMU functions

Fix the wrong values bit values when setting CMU band which were the
same for both 'enable == true' and 'enable == false'.

While at it, fix some coding issues in the CMU functions:
- drop confusing debug output
- use ternary value instead of if-else
- return proper error
- make variable declaration in reverse christmas tree
- drop unneeded temporary value

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21707
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c