mirror of
https://github.com/openwrt/openwrt.git
synced 2026-12-05 21:45:42 +04:00
realtek: l3: add setup callback
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>
This commit is contained in:
1 parent
867afa0e03
commit
658cdf86ad
2 files changed
+7
No files matched your search
@@ -1375,6 +1375,12 @@ int otto_l3_probe(struct device *dev, struct rtl838x_switch_priv *priv)
|
||||
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);
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ struct otto_l3_config {
|
||||
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 {
|
||||
|
||||
Reference in new issue
Block a user