Files
openwrt/target/linux/ipq806x
Mieczyslaw Nalewaj bcb16b6347 ipq806x: stmmac: force netdev name from DT ethernet alias
Interface naming currently depends on registration order between
stmmac instances, which is non-deterministic when multiple probes
race at boot (e.g. two independent GMACs with no shared switch).
This causes eth0/eth1 to swap randomly across reboots on some
platforms.

Force the netdev name to match the "ethernetN" DT alias when one is
present. plat->bus_id cannot be used for this: stmmac_platform.c
falls back to a driver-global counter when of_alias_get_id() finds
no alias, so plat->bus_id is never negative and every stmmac netdev
would be forced, including boards with no alias at all. Re-read the
alias directly from the device's OF node instead, and only force the
name when it actually resolves. Fall back to the original
auto-numbering template if the forced name collides.

unifi-ac-hd already has a correct alias mapping, so the preinit
eth0/eth1 swap hack for it is no longer needed. Drop it.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/25143
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-10-17 16:20:43 +02:00
..
2026-10-17 16:20:43 +02:00
2026-10-06 15:11:36 +02:00
2026-10-13 13:54:44 +02:00