switchdev: bring back switchdev_obj and use it as a generic object param
Replace "void *obj" with a generic structure. Introduce couple of helpers along that. 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>
This commit is contained in:

committed by
David S. Miller

parent
52ba57cfdc
commit
648b4a995a
@@ -89,7 +89,7 @@ static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br,
|
||||
};
|
||||
|
||||
err = switchdev_port_obj_add(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
|
||||
&v);
|
||||
&v.obj);
|
||||
if (err == -EOPNOTSUPP)
|
||||
err = 0;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ static int __vlan_vid_del(struct net_device *dev, struct net_bridge *br,
|
||||
};
|
||||
|
||||
err = switchdev_port_obj_del(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
|
||||
&v);
|
||||
&v.obj);
|
||||
if (err == -EOPNOTSUPP)
|
||||
err = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user