aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 3e1bd14cc0ab..89266a3e473d 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -65,6 +65,7 @@ enum switchdev_obj_id {
};
struct switchdev_obj {
+ enum switchdev_obj_id id;
};
/* SWITCHDEV_OBJ_ID_PORT_VLAN */
@@ -131,14 +132,11 @@ struct switchdev_ops {
struct switchdev_attr *attr,
struct switchdev_trans *trans);
int (*switchdev_port_obj_add)(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj,
struct switchdev_trans *trans);
int (*switchdev_port_obj_del)(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj);
int (*switchdev_port_obj_dump)(struct net_device *dev,
- enum switchdev_obj_id id,
struct switchdev_obj *obj,
switchdev_obj_dump_cb_t *cb);
};
@@ -170,12 +168,11 @@ int switchdev_port_attr_get(struct net_device *dev,
struct switchdev_attr *attr);
int switchdev_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr);
-int switchdev_port_obj_add(struct net_device *dev, enum switchdev_obj_id id,
+int switchdev_port_obj_add(struct net_device *dev,
const struct switchdev_obj *obj);
-int switchdev_port_obj_del(struct net_device *dev, enum switchdev_obj_id id,
+int switchdev_port_obj_del(struct net_device *dev,
const struct switchdev_obj *obj);
-int switchdev_port_obj_dump(struct net_device *dev, enum switchdev_obj_id id,
- struct switchdev_obj *obj,
+int switchdev_port_obj_dump(struct net_device *dev, struct switchdev_obj *obj,
switchdev_obj_dump_cb_t *cb);
int register_switchdev_notifier(struct notifier_block *nb);
int unregister_switchdev_notifier(struct notifier_block *nb);
@@ -221,21 +218,18 @@ static inline int switchdev_port_attr_set(struct net_device *dev,
}
static inline int switchdev_port_obj_add(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj)
{
return -EOPNOTSUPP;
}
static inline int switchdev_port_obj_del(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj)
{
return -EOPNOTSUPP;
}
static inline int switchdev_port_obj_dump(struct net_device *dev,
- enum switchdev_obj_id id,
const struct switchdev_obj *obj,
switchdev_obj_dump_cb_t *cb)
{