net: dsa: add support for switchdev VLAN objects
[firefly-linux-kernel-4.4.55.git] / include / net / dsa.h
index 6356f437e91106302f5c317f113d8fd8a45d4070..bd9b76502458fb6d0c1d3aa79aca262487158d80 100644 (file)
@@ -297,6 +297,17 @@ struct dsa_switch_driver {
        int     (*port_stp_update)(struct dsa_switch *ds, int port,
                                   u8 state);
 
+       /*
+        * VLAN support
+        */
+       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);
+
        /*
         * Forwarding database
         */