diff options
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index e609d64a2216..842a1f2488b2 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -344,113 +344,6 @@ void dsa_flush_workqueue(void) } EXPORT_SYMBOL_GPL(dsa_flush_workqueue); -int dsa_devlink_param_get(struct devlink *dl, u32 id, - struct devlink_param_gset_ctx *ctx) -{ - struct dsa_switch *ds = dsa_devlink_to_ds(dl); - - if (!ds->ops->devlink_param_get) - return -EOPNOTSUPP; - - return ds->ops->devlink_param_get(ds, id, ctx); -} -EXPORT_SYMBOL_GPL(dsa_devlink_param_get); - -int dsa_devlink_param_set(struct devlink *dl, u32 id, - struct devlink_param_gset_ctx *ctx) -{ - struct dsa_switch *ds = dsa_devlink_to_ds(dl); - - if (!ds->ops->devlink_param_set) - return -EOPNOTSUPP; - - return ds->ops->devlink_param_set(ds, id, ctx); -} -EXPORT_SYMBOL_GPL(dsa_devlink_param_set); - -int dsa_devlink_params_register(struct dsa_switch *ds, - const struct devlink_param *params, - size_t params_count) -{ - return devlink_params_register(ds->devlink, params, params_count); -} -EXPORT_SYMBOL_GPL(dsa_devlink_params_register); - -void dsa_devlink_params_unregister(struct dsa_switch *ds, - const struct devlink_param *params, - size_t params_count) -{ - devlink_params_unregister(ds->devlink, params, params_count); -} -EXPORT_SYMBOL_GPL(dsa_devlink_params_unregister); - -int dsa_devlink_resource_register(struct dsa_switch *ds, - const char *resource_name, - u64 resource_size, - u64 resource_id, - u64 parent_resource_id, - const struct devlink_resource_size_params *size_params) -{ - return devlink_resource_register(ds->devlink, resource_name, - resource_size, resource_id, - parent_resource_id, - size_params); -} -EXPORT_SYMBOL_GPL(dsa_devlink_resource_register); - -void dsa_devlink_resources_unregister(struct dsa_switch *ds) -{ - devlink_resources_unregister(ds->devlink); -} -EXPORT_SYMBOL_GPL(dsa_devlink_resources_unregister); - -void dsa_devlink_resource_occ_get_register(struct dsa_switch *ds, - u64 resource_id, - devlink_resource_occ_get_t *occ_get, - void *occ_get_priv) -{ - return devlink_resource_occ_get_register(ds->devlink, resource_id, - occ_get, occ_get_priv); -} -EXPORT_SYMBOL_GPL(dsa_devlink_resource_occ_get_register); - -void dsa_devlink_resource_occ_get_unregister(struct dsa_switch *ds, - u64 resource_id) -{ - devlink_resource_occ_get_unregister(ds->devlink, resource_id); -} -EXPORT_SYMBOL_GPL(dsa_devlink_resource_occ_get_unregister); - -struct devlink_region * -dsa_devlink_region_create(struct dsa_switch *ds, - const struct devlink_region_ops *ops, - u32 region_max_snapshots, u64 region_size) -{ - return devlink_region_create(ds->devlink, ops, region_max_snapshots, - region_size); -} -EXPORT_SYMBOL_GPL(dsa_devlink_region_create); - -struct devlink_region * -dsa_devlink_port_region_create(struct dsa_switch *ds, - int port, - const struct devlink_port_region_ops *ops, - u32 region_max_snapshots, u64 region_size) -{ - struct dsa_port *dp = dsa_to_port(ds, port); - - return devlink_port_region_create(&dp->devlink_port, ops, - region_max_snapshots, - region_size); -} -EXPORT_SYMBOL_GPL(dsa_devlink_port_region_create); - -void dsa_devlink_region_destroy(struct devlink_region *region) -{ - devlink_region_destroy(region); -} -EXPORT_SYMBOL_GPL(dsa_devlink_region_destroy); - struct dsa_port *dsa_port_from_netdev(struct net_device *netdev) { if (!netdev || !dsa_slave_dev_check(netdev)) |