OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: dsa: Remove prepare phase for FDB
[uclinux-h8/linux.git]
/
net
/
dsa
/
switch.c
diff --git
a/net/dsa/switch.c
b/net/dsa/switch.c
index
97e2e9c
..
eb20e0f
100644
(file)
--- 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 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;
/* 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,
}
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;
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,
}
static int dsa_switch_mdb_add(struct dsa_switch *ds,