From: Tobias Schramm Date: Sat, 23 Dec 2023 12:41:01 +0000 (+0100) Subject: realtek: 5.15: rtl93xx: support 100BASE-T and 10BASE-T MAC modes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8b706d9297ed9aa9ba15e759bfacf207640e43ad;p=openwrt%2Fstaging%2Fthess.git realtek: 5.15: rtl93xx: support 100BASE-T and 10BASE-T MAC modes The MAC embedded in rtl93xx switch SoCs needs different mac mode bits set to support 10BaseT and 100BaseT link modes. Set them accordingly. This change has been tested on a ZyXEL XGS1250-12. Signed-off-by: Tobias Schramm --- diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 063ce9b8c5..d246e60cb2 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -854,8 +854,11 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port, case SPEED_1000: reg |= 2 << 3; break; + case SPEED_100: + reg |= 1 << 3; + break; default: - reg |= 2 << 3; + /* Also covers 10M */ break; }