]> 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)
commit3bc34ec323881f783e9a950046acb84938f4b548
treed3c79e99b95a2b17941c40ee01d3676f99371b69
parent84d26e7b0cefe7a7cf19507f6061c3d004312906
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