realtek: Fix VLAN issues introduced by multicast patches
authorBirger Koblitz <mail@birger-koblitz.de>
Sun, 9 May 2021 10:04:16 +0000 (12:04 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sun, 9 May 2021 14:19:31 +0000 (16:19 +0200)
This adds the CPU port to the unknown multicast flooding port mask,
which fixes the VLAN issues introduced by the multicast group patches

Tested-by: Russell Senior <russell@personaltelco.net> [Netgear GS108Tv3]
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no> [whitespace fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz> [unknwon typo fix]
target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c

index dfd773c5e6fc318b23a394e76d1386b7eb0e176f..5d764b6a32d62be274593b25fe029ace9985f504 100644 (file)
@@ -398,7 +398,7 @@ static void rtl838x_vlan_profile_setup(int profile)
         * On RTL93XX, the portmask is directly set in the profile,
         * see e.g. rtl9300_vlan_profile_setup
         */
-       rtl838x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0xfffffff);
+       rtl838x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x1fffffff);
 }
 
 static inline int rtl838x_vlan_port_egr_filter(int port)
index 74472461a15b6239a95b29836cfac8ad2264f584..c62dc441c13096aa21a6b2e7864b4afee9b664e2 100644 (file)
@@ -411,7 +411,7 @@ static void rtl839x_vlan_profile_setup(int profile)
        sw_w32(p[0], RTL839X_VLAN_PROFILE(profile));
        sw_w32(p[1], RTL839X_VLAN_PROFILE(profile) + 4);
 
-       rtl839x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x000fffffffffffff);
+       rtl839x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x001fffffffffffff);
 }
 
 static inline int rtl839x_vlan_port_egr_filter(int port)
index 820c78165a3c8677697fb25349cc10c4aff91c3f..f1de39f0bce674e7c3fee66de1f18cdc1c792575 100644 (file)
@@ -153,9 +153,9 @@ static void rtl930x_vlan_profile_setup(int profile)
 
        // Enable routing of Ipv4/6 Unicast and IPv4/6 Multicast traffic
        p[0] |= BIT(17) | BIT(16) | BIT(13) | BIT(12);
-       p[2] = 0x0fffffff; // L2 unknwon MC flooding portmask: all but the CPU-port
-       p[3] = 0x0fffffff; // IPv4 unknwon MC flooding portmask
-       p[4] = 0x0fffffff; // IPv6 unknwon MC flooding portmask
+       p[2] = 0x1fffffff; // L2 unknown MC flooding portmask all ports, including the CPU-port
+       p[3] = 0x1fffffff; // IPv4 unknown MC flooding portmask
+       p[4] = 0x1fffffff; // IPv6 unknown MC flooding portmask
 
        sw_w32(p[0], RTL930X_VLAN_PROFILE_SET(profile));
        sw_w32(p[1], RTL930X_VLAN_PROFILE_SET(profile) + 4);