rtl83xx: fix STP by trapping BPDUs
authorRudolf Vesely <i@rudolfvesely.com>
Mon, 2 Oct 2023 06:51:19 +0000 (06:51 +0000)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 4 Oct 2023 12:18:25 +0000 (14:18 +0200)
Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently
makes switch to ignore Bridge Protocol Data Units (BPDUs).

Tested on Zyxel GS1900-8, 24 and 48.

Signed-off-by: Rudolf Vesely <i@rudolfvesely.com>
[ improve commit description and add new line in different sections ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c

index 6b661f90adebbf3502fa1974c2f03fbf8aeb98e4..063ce9b8c5d0da2c51374b602f27511951f60e04 100644 (file)
@@ -152,7 +152,7 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
 static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
 {
        for (int i = 0; i < priv->cpu_port; i++)
-               priv->r->set_receive_management_action(i, BPDU, COPY2CPU);
+               priv->r->set_receive_management_action(i, BPDU, TRAP2CPU);
 }
 
 static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv,