X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=net%2Fdsa%2Fswitch.c;h=eb20e0fee0e1948a091bc73f1b8cffe38832620a;hb=1b6dd556c304;hp=97e2e9c8cf3f02a6ad1d3382119efc7924a76989;hpb=7e5fed09ddbb7d0f16af0ebdaca2c22b0a2fed77;p=uclinux-h8%2Flinux.git diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 97e2e9c8cf3f..eb20e0fee0e1 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -84,22 +84,15 @@ static int dsa_switch_fdb_add(struct dsa_switch *ds, struct dsa_notifier_fdb_info *info) { const struct switchdev_obj_port_fdb *fdb = info->fdb; - struct switchdev_trans *trans = info->trans; /* Do not care yet about other switch chips of the fabric */ if (ds->index != info->sw_index) return 0; - if (switchdev_trans_ph_prepare(trans)) { - if (!ds->ops->port_fdb_prepare || !ds->ops->port_fdb_add) - return -EOPNOTSUPP; - - return ds->ops->port_fdb_prepare(ds, info->port, fdb, trans); - } - - ds->ops->port_fdb_add(ds, info->port, fdb, trans); + if (!ds->ops->port_fdb_add) + return -EOPNOTSUPP; - return 0; + return ds->ops->port_fdb_add(ds, info->port, fdb->addr, fdb->vid); } static int dsa_switch_fdb_del(struct dsa_switch *ds, @@ -114,7 +107,8 @@ static int dsa_switch_fdb_del(struct dsa_switch *ds, if (!ds->ops->port_fdb_del) return -EOPNOTSUPP; - return ds->ops->port_fdb_del(ds, info->port, fdb); + return ds->ops->port_fdb_del(ds, info->port, fdb->addr, + fdb->vid); } static int dsa_switch_mdb_add(struct dsa_switch *ds,