diff options
| author | Harshal Gohel <hg@simonwunderlich.de> | 2024-01-03 15:53:47 +0100 |
|---|---|---|
| committer | Sander Vanheule <sander@svanheule.net> | 2024-01-09 21:19:41 +0100 |
| commit | da495c477d9018d59b1f6deb128cc8372d16df16 (patch) | |
| tree | 255b769bc6c7d6f38725cfd1e422b35f687af47a /target/linux | |
| parent | fe01435b6933756f4a916e4bccc409a88e3fcc56 (diff) | |
| download | upstream-da495c477d9018d59b1f6deb128cc8372d16df16.tar.gz upstream-da495c477d9018d59b1f6deb128cc8372d16df16.tar.bz2 upstream-da495c477d9018d59b1f6deb128cc8372d16df16.zip | |
rtl93xx: dsa: Fix 802.1QinQ for trunk ports
Fix incorrect register value being set for VLAN_PORT_FWD
Before, the 0b1111 would be set for the register which means outgoing
packets would receive an extra tag, corresponding to the PVID of the
port.
On untagged ports, this meant outgoing packets with a single tag.
On tagged ports, this meant outgoing QinQ packets, where the inner tag
was either the PVID of the untagged ingress port, or the already
assigned original (single) tag.
Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Diffstat (limited to 'target/linux')
| -rw-r--r-- | target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl930x.c | 4 | ||||
| -rw-r--r-- | target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl930x.c index 4a4a926bb21..793d7624897 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl930x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl930x.c @@ -258,9 +258,9 @@ static void rtl930x_vlan_fwd_on_inner(int port, bool is_set) { /* Always set all tag modes to fwd based on either inner or outer tag */ if (is_set) - sw_w32_mask(0, 0xf, RTL930X_VLAN_PORT_FWD + (port << 2)); - else sw_w32_mask(0xf, 0, RTL930X_VLAN_PORT_FWD + (port << 2)); + else + sw_w32_mask(0, 0xf, RTL930X_VLAN_PORT_FWD + (port << 2)); } static void rtl930x_vlan_profile_setup(int profile) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c index 3221109c180..0e82d79d4cb 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c @@ -827,9 +827,9 @@ static void rtl931x_vlan_fwd_on_inner(int port, bool is_set) { /* Always set all tag modes to fwd based on either inner or outer tag */ if (is_set) - sw_w32_mask(0, 0xf, RTL931X_VLAN_PORT_FWD + (port << 2)); - else sw_w32_mask(0xf, 0, RTL931X_VLAN_PORT_FWD + (port << 2)); + else + sw_w32_mask(0, 0xf, RTL931X_VLAN_PORT_FWD + (port << 2)); } static void rtl931x_vlan_profile_setup(int profile) |
