diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-04-28 21:45:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-01 06:05:29 +0300 |
commit | 314f76d7a68bab0516aa52877944e6aacfa0fc3f (patch) | |
tree | 69566e08f1d74a449e6df3d1444ef89925084780 /net/dsa/dsa_priv.h | |
parent | e74f014eb4ceeeefe4e5058daac705422eecb683 (diff) | |
download | linux-314f76d7a68bab0516aa52877944e6aacfa0fc3f.tar.xz |
net: dsa: Add more convenient functions for installing port VLANs
This hides the need to perform a two-phase transaction and construct a
switchdev_obj_port_vlan struct.
Call graph (including a function that will be introduced in a follow-up
patch) looks like this now (same for the *_vlan_del function):
dsa_slave_vlan_rx_add_vid dsa_port_setup_8021q_tagging
| |
| |
| +-------------+
| |
v v
dsa_port_vid_add dsa_slave_port_obj_add
| |
+-------+ +-------+
| |
v v
dsa_port_vlan_add
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r-- | net/dsa/dsa_priv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index e860512d673a..37751b505572 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -171,6 +171,8 @@ int dsa_port_vlan_add(struct dsa_port *dp, struct switchdev_trans *trans); int dsa_port_vlan_del(struct dsa_port *dp, const struct switchdev_obj_port_vlan *vlan); +int dsa_port_vid_add(struct dsa_port *dp, u16 vid, u16 flags); +int dsa_port_vid_del(struct dsa_port *dp, u16 vid); int dsa_port_link_register_of(struct dsa_port *dp); void dsa_port_link_unregister_of(struct dsa_port *dp); |