summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshal Gohel2025-07-14 08:59:06 +0000
committerHauke Mehrtens2025-08-10 12:35:40 +0000
commit743f2cd731b1186c86b7d9451d2ef6b81fcc4571 (patch)
tree34776f129f52690de611652a8f827ca2b53abf85
parent551a6cef582ce9eb342a826c3ac3e40bddba7580 (diff)
downloadopenwrt-743f2cd731b1186c86b7d9451d2ef6b81fcc4571.tar.gz
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@simonwunderlich.de> Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de> Link: https://github.com/openwrt/openwrt/pull/19569 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c10
1 files 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;