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>
{
/* 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)
{
/* 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)