[openwrt/openwrt] realtek: rtl931x: Don't use RTL8xx port flooding initialization
LEDE Commits
lede-commits at lists.infradead.org
Sun Aug 10 05:36:52 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/743f2cd731b1186c86b7d9451d2ef6b81fcc4571
commit 743f2cd731b1186c86b7d9451d2ef6b81fcc4571
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 14 10:59:06 2025 +0200
realtek: rtl931x: Don't use RTL8xx port flooding initialization
Neither the RTL930x not the RT931x use the BPDU flooding mechanism which
was used for other SoCs. At the same time, the RTL931x must use the same
debugfs initialization function as RTL930x.
Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19569
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index 2dd93de552..9ccf1e1840 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -1691,8 +1691,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
goto err_register_fib_nb;
/* TODO: put this into l2_setup() */
- /* Flood BPDUs to all ports including cpu-port */
- if (soc_info.family != RTL9300_FAMILY_ID) {
+ switch (soc_info.family) {
+ default:
+ /* Flood BPDUs to all ports including cpu-port */
bpdu_mask = soc_info.family == RTL8380_FAMILY_ID ? 0x1FFFFFFF : 0x1FFFFFFFFFFFFF;
priv->r->set_port_reg_be(bpdu_mask, priv->r->rma_bpdu_fld_pmask);
@@ -1700,8 +1701,11 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
sw_w32(7, priv->r->spcl_trap_eapol_ctrl);
rtl838x_dbgfs_init(priv);
- } else {
+ break;
+ case RTL9300_FAMILY_ID:
+ case RTL9310_FAMILY_ID:
rtl930x_dbgfs_init(priv);
+ break;
}
return 0;
More information about the lede-commits
mailing list