net: dsa: felix: move the updating of PGID_CPU to the ocelot lib
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 21 May 2022 21:37:39 +0000 (00:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 May 2022 09:39:54 +0000 (10:39 +0100)
commit61be79ba2d90162b0b213384f35eb8db7eb183b8
treee99092abb9bf3632f0d9162f63b2ee0c2385cff2
parent129b7532a0edc3f381a6c5f3bb1a155e743d141b
net: dsa: felix: move the updating of PGID_CPU to the ocelot lib

PGID_CPU must be updated every time a port is configured or unconfigured
as a tag_8021q CPU port. The ocelot switch lib already has a hook for
that operation, so move the updating of PGID_CPU to those hooks.

These bits are pretty specific to DSA, so normally I would keep them out
of the common switch lib, but when tag_8021q is in use, this has
implications upon the forwarding mask determined by
ocelot_apply_bridge_fwd_mask() and called extensively by the switch lib.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/mscc/ocelot.c