Move the rtpcs_link pointer array from rtpcs_ctrl (keyed by global DSA port) into rtpcs_serdes (keyed by the per-SerDes link index). This matches how the hardware is structured -- a SerDes hosts up to RTPCS_MAX_LINKS_PER_SDS PCS links -- and aligns the in-driver addressing with the cell the DTSes just gained on pcs-handle, so the upcoming fwnode_pcs resolver becomes a direct sds->link[cell] lookup. rtpcs_create() takes a new link_idx parameter and stores into sds->link[link_idx] instead of ctrl->link[port]; the DSA glue switches its phandle lookup to of_parse_phandle_with_args() and forwards the cell. The port number stays on rtpcs_link for legacy callers that still need it. Bounds and double-bind checks (-EINVAL, -EBUSY) guard against malformed DT references that would otherwise OOB or silently overwrite an existing link. Drops RTPCS_PORT_CNT, whose only user was the relocated array, and fixes a pre-existing of_node_put leak on the pcs-handle phandle in the DSA glue as a side effect of the parse-with-args conversion. Link: https://github.com/openwrt/openwrt/pull/23539 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> |
||
|---|---|---|
| .. | ||
| imagebuilder | ||
| linux | ||
| llvm-bpf | ||
| sdk | ||
| toolchain | ||
| Config.in | ||
| Makefile | ||