]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: check VLAN capability of every switch
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Wed, 7 Jun 2017 22:12:14 +0000 (18:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 15:43:31 +0000 (11:43 -0400)
commit6d0b9481f0f72332f3e4c5990a3d8cdd03d5552f
treed3c79e99b95a2b17941c40ee01d3676f99371b69
parent7a2aafb5735719e164e61b64edb511f664bef48f
net: dsa: check VLAN capability of every switch

Now that the VLAN object is propagated to every switch chip of the
switch fabric, we can easily ensure that they all support the required
VLAN operations before modifying an entry on a single switch.

To achieve that, remove the condition skipping other target switches,
and add a bitmap of VLAN members, eventually containing the target port,
if we are programming the switch target.

This will allow us to easily add other VLAN members, such as the DSA or
CPU ports (to introduce cross-chip VLAN support) or the other port
members if we want to reduce hardware accesses later.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/switch.c