]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: rtl931x: Don't use RTL8xx port flooding initialization
authorHarshal Gohel <hg@simonwunderlich.de>
Mon, 14 Jul 2025 08:59:06 +0000 (10:59 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 10 Aug 2025 12:35:40 +0000 (14:35 +0200)
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>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c

index 2dd93de5522fb836d537724396c7270bc5a7c12f..9ccf1e1840b73af52856e51dc2c83e480ed6f129 100644 (file)
@@ -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;