net: dsa: microchip: ksz8795: Use software untagging on CPU port
authorBen Hutchings <ben.hutchings@mind.be>
Mon, 16 Aug 2021 18:09:45 +0000 (20:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 06:59:19 +0000 (08:59 +0200)
commit3a24e121304abd9b09ceca201e2a344e722fa974
tree3397a4c502788571421ff4eb2bffe8a73f9f98d4
parent1e78179d75fb796b015f4d71d01d8e8725fde466
net: dsa: microchip: ksz8795: Use software untagging on CPU port

commit 9130c2d30c17846287b803a9803106318cbe5266 upstream.

On the CPU port, we can support both tagged and untagged VLANs at the
same time by doing any necessary untagging in software rather than
hardware.  To enable that, keep the CPU port's Remove Tag flag cleared
and set the dsa_switch::untag_bridge_pvid flag.

Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backport to 5.10: adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/microchip/ksz8795.c