mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 17:01:44 +04:00
f95dbe3575
The whole driver often does some range checks of the SerDes ID to restrict some functionality to a group of SerDes. However, having these open-coded checks everywhere is rather confusing because it's not obvious what it actually means. Luckily, those checks give a good picture of what SerDes types we have: - 5G: RTL838x, RTL839x (0-7, 10, 11), RTL930x (0, 1) - 10G: RTL839x (8, 9, 12, 13), RTL930x (2-9), RTL931x (2-13) - unknown: RTL930x (10, 11), RTL931x (0, 1) Add a new enum and field in rtpcs_serdes for the type of a SerDes we have. This is filled during SerDes probe, making use of the stub implementations for that hook.. All SerDes ID range checks related to this are replaced with corresponding checks of the SerDes type. Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22941 Signed-off-by: Robert Marko <robimarko@gmail.com>