diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2015-11-01 17:33:55 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-01 20:56:11 (GMT) |
commit | 76e398a6271285c1f361d66445a55cdcee5c1b4b (patch) | |
tree | dbda581bc4be2cc8906b3866815de574cb58ad63 /include/net/dsa.h | |
parent | ea3803c193df18d8353d6c8d77034066a08c19f5 (diff) | |
download | linux-76e398a6271285c1f361d66445a55cdcee5c1b4b.tar.xz |
net: dsa: use switchdev obj for VLAN add/del ops
Simplify DSA by pushing the switchdev objects for VLAN add and delete
operations down to its drivers. Currently only mv88e6xxx is affected.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 98ccbde..82a4c60 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -200,6 +200,7 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds) struct switchdev_trans; struct switchdev_obj; struct switchdev_obj_port_fdb; +struct switchdev_obj_port_vlan; struct dsa_switch_driver { struct list_head list; @@ -309,11 +310,15 @@ struct dsa_switch_driver { /* * VLAN support */ + int (*port_vlan_prepare)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan, + struct switchdev_trans *trans); + int (*port_vlan_add)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan, + struct switchdev_trans *trans); + int (*port_vlan_del)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan); int (*port_pvid_get)(struct dsa_switch *ds, int port, u16 *pvid); - int (*port_pvid_set)(struct dsa_switch *ds, int port, u16 pvid); - int (*port_vlan_add)(struct dsa_switch *ds, int port, u16 vid, - bool untagged); - int (*port_vlan_del)(struct dsa_switch *ds, int port, u16 vid); int (*vlan_getnext)(struct dsa_switch *ds, u16 *vid, unsigned long *ports, unsigned long *untagged); |