You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stm32/eth: Consolidate DHCP restart logic and fix static IP.
Static IP configured before active(True) was being overwritten when MAC
speed/duplex reconfiguration occurred (~2s after link up). The MAC
reconfiguration code restarted DHCP whenever a DHCP struct existed,
without checking if a static IP was configured.
Created eth_dhcp_restart_if_needed() helper function that checks if IP
is 0.0.0.0 before restarting DHCP. Consolidated 3 locations with
duplicated DHCP restart logic to use this helper, reducing code size
by 30 lines while fixing the bug.
This ensures static IP is preserved through MAC reconfiguration, cable
unplug/replug, and interface activation.
Signed-off-by: Andrew Leech <[email protected]>
0 commit comments