summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-10-01 11:03:46 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-03 13:49:40 +0200
commit9e8f4a548ab4710002c23c94c4b1bbde91b5e335 (patch)
treec2fe29079ccd3dd3a5218ad966ed0bab047d5e69 /net/dsa
parentswitchdev: bring back switchdev_obj and use it as a generic object param (diff)
downloadlinux-9e8f4a548ab4710002c23c94c4b1bbde91b5e335.tar.xz
linux-9e8f4a548ab4710002c23c94c4b1bbde91b5e335.zip
switchdev: push object ID back to object structure
Suggested-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/slave.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 3f6d79d03457..5f65f929902e 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -474,7 +474,6 @@ static int dsa_slave_port_attr_set(struct net_device *dev,
}
static int dsa_slave_port_obj_add(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj,
struct switchdev_trans *trans)
{
@@ -485,7 +484,7 @@ static int dsa_slave_port_obj_add(struct net_device *dev,
* supported, return -EOPNOTSUPP.
*/
- switch (id) {
+ switch (obj->id) {
case SWITCHDEV_OBJ_ID_PORT_FDB:
err = dsa_slave_port_fdb_add(dev,
SWITCHDEV_OBJ_PORT_FDB(obj),
@@ -505,12 +504,11 @@ static int dsa_slave_port_obj_add(struct net_device *dev,
}
static int dsa_slave_port_obj_del(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj)
{
int err;
- switch (id) {
+ switch (obj->id) {
case SWITCHDEV_OBJ_ID_PORT_FDB:
err = dsa_slave_port_fdb_del(dev,
SWITCHDEV_OBJ_PORT_FDB(obj));
@@ -528,13 +526,12 @@ static int dsa_slave_port_obj_del(struct net_device *dev,
}
static int dsa_slave_port_obj_dump(struct net_device *dev,
- enum switchdev_obj_id id,
struct switchdev_obj *obj,
switchdev_obj_dump_cb_t *cb)
{
int err;
- switch (id) {
+ switch (obj->id) {
case SWITCHDEV_OBJ_ID_PORT_FDB:
err = dsa_slave_port_fdb_dump(dev,
SWITCHDEV_OBJ_PORT_FDB(obj),