net: dsa: use switchdev obj in port_fdb_del
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 8 Oct 2015 15:35:14 +0000 (11:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Oct 2015 12:28:52 +0000 (05:28 -0700)
For consistency with the FDB add operation, propagate the
switchdev_obj_port_fdb structure in the DSA drivers.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c
drivers/net/dsa/mv88e6xxx.h
include/net/dsa.h
net/dsa/slave.c

index 644fffc6b98b1ba20d611097088970ecfde1b60d..87b405e4f9f6432ff6e7bfbc1502449c6e2762e9 100644 (file)
@@ -1870,13 +1870,13 @@ int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port,
 }
 
 int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
-                          const unsigned char *addr, u16 vid)
+                          const struct switchdev_obj_port_fdb *fdb)
 {
        struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
        int ret;
 
        mutex_lock(&ps->smi_mutex);
-       ret = _mv88e6xxx_port_fdb_load(ds, port, addr, vid,
+       ret = _mv88e6xxx_port_fdb_load(ds, port, fdb->addr, fdb->vid,
                                       GLOBAL_ATU_DATA_STATE_UNUSED);
        mutex_unlock(&ps->smi_mutex);
 
index 86a94dc0d86e9aad9301bc9589efdc24e13b6762..8325c11b9be27eb8defe2b952a9d9a93cf1d516d 100644 (file)
@@ -481,7 +481,7 @@ int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port,
                           const struct switchdev_obj_port_fdb *fdb,
                           struct switchdev_trans *trans);
 int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
-                          const unsigned char *addr, u16 vid);
+                          const struct switchdev_obj_port_fdb *fdb);
 int mv88e6xxx_port_fdb_getnext(struct dsa_switch *ds, int port,
                               unsigned char *addr, u16 *vid, bool *is_static);
 int mv88e6xxx_phy_page_read(struct dsa_switch *ds, int port, int page, int reg);
index ce8f9b748a77c7e16ab35dc8ba4b6f38c3661f5d..e00588625bc298874fd7011026e7dcf6ab60e3c0 100644 (file)
@@ -326,7 +326,7 @@ struct dsa_switch_driver {
                                const struct switchdev_obj_port_fdb *fdb,
                                struct switchdev_trans *trans);
        int     (*port_fdb_del)(struct dsa_switch *ds, int port,
-                               const unsigned char *addr, u16 vid);
+                               const struct switchdev_obj_port_fdb *fdb);
        int     (*port_fdb_getnext)(struct dsa_switch *ds, int port,
                                    unsigned char *addr, u16 *vid,
                                    bool *is_static);
index 6f7f27e9410c37bdc15e2e9e5445f5243f0b6728..bb2bd3b56b1611b94b75bb8d05a1387e4ab37904 100644 (file)
@@ -367,7 +367,7 @@ static int dsa_slave_port_fdb_del(struct net_device *dev,
        int ret = -EOPNOTSUPP;
 
        if (ds->drv->port_fdb_del)
-               ret = ds->drv->port_fdb_del(ds, p->port, fdb->addr, fdb->vid);
+               ret = ds->drv->port_fdb_del(ds, p->port, fdb);
 
        return ret;
 }