diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-10-31 11:29:15 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-03 02:09:07 +0100 |
commit | 2f0402fedf20cc97b90837f6a9e2f5dc670afd4d (patch) | |
tree | 4b68b1c5e10b2f97738f4fbbd7d5fc4d2168ce32 /include | |
parent | net: mscc: ocelot: move the logic to drop 802.1p traffic to the pvid deletion (diff) | |
download | linux-2f0402fedf20cc97b90837f6a9e2f5dc670afd4d.tar.xz linux-2f0402fedf20cc97b90837f6a9e2f5dc670afd4d.zip |
net: mscc: ocelot: deny changing the native VLAN from the prepare phase
Put the preparation phase of switchdev VLAN objects to some good use,
and move the check we already had, for preventing the existence of more
than one egress-untagged VLAN per port, to the preparation phase of the
addition.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/soc/mscc/ocelot.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 67c2af1c4c5c..ea1de185f2e4 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -747,6 +747,8 @@ int ocelot_fdb_add(struct ocelot *ocelot, int port, const unsigned char *addr, u16 vid); int ocelot_fdb_del(struct ocelot *ocelot, int port, const unsigned char *addr, u16 vid); +int ocelot_vlan_prepare(struct ocelot *ocelot, int port, u16 vid, bool pvid, + bool untagged); int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, bool untagged); int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid); |