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>
This commit is contained in:
parent
fe01435b69
commit
da495c477d
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue