openwrt/target/linux/realtek
Markus Stockhausen 9533e2e574 realtek: dsa: relax capability checks for 2.5G modes
The driver currently uses two checks to verify the capabilities. These
are ..._phylink_get_caps() and ..._pcs_validate(). For RTL930x these
must allow 2.5G modes. Enhance that as follows:

Add 2500BASEX to phylink_get_caps(). Sort the interfaces alphabetically
and rename the function to the new prefix. IMPORTANT REMARK! Until now
this function allowed the XGMII mode (10G only parallel interface) that
was somehow mixed with the Realtek proprietary mode XSGMII (10G SGMII).
Remove it to avoid further confusion.

Looking upstream pcs_validate() is used less and less. There are only
2 consumers left in 6.16 and the calling location reads:

	/* Validate the link parameters with the PCS */
	if (pcs->ops->pcs_validate) {
		ret = pcs->ops->pcs_validate(pcs, supported, state);
		if (ret < 0 || phylink_is_empty_linkmode(supported))
			return -EINVAL;

		/* Ensure the advertising mask is a subset of the
		 * supported mask.
		 */
		linkmode_and(state->advertising, state->advertising,
			     supported);
	}

There is no need for this additional check. Drop the functions.

Tested-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19429
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-24 00:35:00 +02:00
..
base-files realtek: add support for TP-Link TL-ST1008F v2.0 2025-06-16 13:30:52 +02:00
dts realtek: Use Otto timer on RTL931x 2025-06-22 23:12:02 +02:00
files/firmware/rtl838x_phy
files-6.12 realtek: dsa: relax capability checks for 2.5G modes 2025-07-24 00:35:00 +02:00
image realtek: add RTL931x support to rt-loader 2025-07-03 11:42:21 +02:00
patches-6.12 realtek: backport MIPS GIC patch 2025-06-22 23:12:02 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: remove patches, files and config for 6.6 2025-06-22 16:38:11 +02:00
rtl839x realtek: remove patches, files and config for 6.6 2025-06-22 16:38:11 +02:00
rtl930x realtek: remove patches, files and config for 6.6 2025-06-22 16:38:11 +02:00
rtl931x realtek: build Otto timer for RTL931x 2025-06-22 23:12:02 +02:00
Makefile realtek: switch to 6.12 as default 2025-06-22 16:38:11 +02:00