forked from Openwrt/openwrt
The qca8k dsa switch can use either an external or internal mdio bus. This depends on whether the mdio node is defined under the switch node itself and, as such, the internal_mdio_mask is populated with its internal phys. Upon registering the internal mdio bus, the internal_mdio_bus of the dsa switch is assigned to this bus. When an external mdio bus is used, it is left unassigned, though its id is used to create the device names of the leds. This leads to the leds being named '(efault):00:green:lan' and so on as the internal_mdio_bus is null. So let's fix this by adding a null check and use the devicename of the external bus instead when an external bus is configured. Signed-off-by: George Moussalem <george.moussalem@outlook.com> Link: https://github.com/openwrt/openwrt/pull/19004 Signed-off-by: Robert Marko <robimarko@gmail.com>
1.5 KiB
1.5 KiB