net: usb: lan78xx: refactor PHY init to separate detection and MAC configuration
Split out PHY detection into lan78xx_get_phy() and MAC-side setup into lan78xx_mac_prepare_for_phy(), making the main lan78xx_phy_init() cleaner and easier to follow. This improves separation of concerns and prepares the code for a future transition to phylink. Fixed PHY registration and interface selection are now handled in lan78xx_get_phy(), while MAC-side delay configuration is done in lan78xx_mac_prepare_for_phy(). The fixed PHY fallback is preserved for setups like EVB-KSZ9897-1, where LAN7801 connects directly to a KSZ switch without a standard PHY or device tree support. No functional changes intended. Signed-off-by:Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by:
Thangaraj Samynathan <thangaraj.s@microchip.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Loading
Please sign in to comment