realtek: pcs: rtl931x: fix clearing symbol errors
authorJonas Jelonek <jelonek.jonas@gmail.com>
Sat, 20 Dec 2025 18:36:56 +0000 (18:36 +0000)
committerRobert Marko <robimarko@gmail.com>
Mon, 29 Dec 2025 16:06:19 +0000 (17:06 +0100)
commit19585a79660a9e0698f2244b5c8ad8d342ddf205
tree7f22ef7f4c0c5d6454d50e8a64c8d9d4bd17b957
parentb8a596e40b64abadbe2d914c5102a897a39df1f7
realtek: pcs: rtl931x: fix clearing symbol errors

Fix the implementation to clear symbol errors. Up to now, it was barely
functional because important modes weren't handled. Add another function
(which is needed in the future anyway) and pick to missing bits from
that function into the symbol clearing function to handle the modes
1000Base-X and 10GBaseR too. All that is based on [1].

While at it, rename the function to adhere to a common naming scheme and
fix some minor style issues.

[1] https://github.com/plappermaul/realtek-doc/blob/69d2890a2e2d7a03df6e40e2cd2c32ff5b074dcf/sources/rtk-dms1250/src/hal/phy/phy_rtl9310.c#L703

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