The existin setup calls must be migrated from the DSA code into
the layer 3 code. Provide a new callback for that. Keep it empty
for now.
Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
return dev_err_probe(dev, -EINVAL, "No compatible configuration found\n");
ctrl->cfg = match->data;
+ if (ctrl->cfg->setup) {
+ err = ctrl->cfg->setup(ctrl);
+ if (err)
+ return dev_err_probe(dev, err, "device specific L3 setup failed\n");
+ }
+
/* Initialize hash table for L3 routing */
rhltable_init(&ctrl->routes, &otto_l3_route_ht_params);
int (*route_lookup_hw)(struct otto_l3_ctrl *ctrl, struct otto_l3_route *rt);
void (*route_read)(struct otto_l3_ctrl *ctrl, int idx, struct otto_l3_route *rt);
void (*route_write)(struct otto_l3_ctrl *ctrl, int idx, struct otto_l3_route *rt);
+ int (*setup)(struct otto_l3_ctrl *ctrl);
};
struct otto_l3_ctrl {