Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / drivers / net / dsa / microchip / ksz_common.c
index 389abfd..a7e5ac6 100644 (file)
@@ -213,15 +213,6 @@ void ksz_port_fast_age(struct dsa_switch *ds, int port)
 }
 EXPORT_SYMBOL_GPL(ksz_port_fast_age);
 
-int ksz_port_vlan_prepare(struct dsa_switch *ds, int port,
-                         const struct switchdev_obj_port_vlan *vlan)
-{
-       /* nothing needed */
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(ksz_port_vlan_prepare);
-
 int ksz_port_fdb_dump(struct dsa_switch *ds, int port, dsa_fdb_dump_cb_t *cb,
                      void *data)
 {
@@ -253,16 +244,8 @@ int ksz_port_fdb_dump(struct dsa_switch *ds, int port, dsa_fdb_dump_cb_t *cb,
 }
 EXPORT_SYMBOL_GPL(ksz_port_fdb_dump);
 
-int ksz_port_mdb_prepare(struct dsa_switch *ds, int port,
-                        const struct switchdev_obj_port_mdb *mdb)
-{
-       /* nothing to do */
-       return 0;
-}
-EXPORT_SYMBOL_GPL(ksz_port_mdb_prepare);
-
-void ksz_port_mdb_add(struct dsa_switch *ds, int port,
-                     const struct switchdev_obj_port_mdb *mdb)
+int ksz_port_mdb_add(struct dsa_switch *ds, int port,
+                    const struct switchdev_obj_port_mdb *mdb)
 {
        struct ksz_device *dev = ds->priv;
        struct alu_struct alu;
@@ -284,7 +267,7 @@ void ksz_port_mdb_add(struct dsa_switch *ds, int port,
 
        /* no available entry */
        if (index == dev->num_statics && !empty)
-               return;
+               return -ENOSPC;
 
        /* add entry */
        if (index == dev->num_statics) {
@@ -301,6 +284,8 @@ void ksz_port_mdb_add(struct dsa_switch *ds, int port,
                alu.fid = mdb->vid;
        }
        dev->dev_ops->w_sta_mac_table(dev, index, &alu);
+
+       return 0;
 }
 EXPORT_SYMBOL_GPL(ksz_port_mdb_add);