]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: clear VLAN PVID flag for CPU port
authorVivien Didelot <vivien.didelot@gmail.com>
Sun, 25 Aug 2019 17:25:20 +0000 (13:25 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 03:17:28 +0000 (20:17 -0700)
commit7fc8948218c65ebf1b2cef6bed9420291dae68a8
tree004515b0f4caad9c8de024a679e439a55606ce7f
parentcc27c00b13fe22f1cd5d6ba7586aca338405349f
net: dsa: clear VLAN PVID flag for CPU port

When the bridge offloads a VLAN on a slave port, we also need to
program its dedicated CPU port as a member of the VLAN.

Drivers may handle the CPU port's membership as they want. For example,
Marvell as a special "Unmodified" mode to pass frames as is through
such ports.

Even though DSA expects the drivers to handle the CPU port membership,
it does not make sense to program user VLANs as PVID on the CPU port.
This patch clears this flag before programming the CPU port.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c