]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mt7530: rework mt7530_hw_vlan_{add,del}
authorFrank Wunderlich <frank-w@public-files.de>
Fri, 10 Jun 2022 17:05:37 +0000 (19:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Jun 2022 05:35:15 +0000 (22:35 -0700)
commit417cabd4aa9b875c617d81088a6541b9c8c70279
treed6fd3160c44059ae6ba283a25de8878c601cfe16
parent792d475b2d2913a8678fbbef9dd480ea4f5b9874
net: dsa: mt7530: rework mt7530_hw_vlan_{add,del}

Rework vlan_add/vlan_del functions in preparation for dynamic cpu port.

Currently BIT(MT7530_CPU_PORT) is added to new_members, even though
mt7530_port_vlan_add() will be called on the CPU port too.

Let DSA core decide when to call port_vlan_add for the CPU port, rather
than doing it implicitly.

We can do autonomous forwarding in a certain VLAN, but not add br0 to that
VLAN and avoid flooding the CPU with those packets, if software knows it
doesn't need to process them.

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mt7530.c