> Hi all,
> I have come across an issue related to DHCP and link status.
> The device does not restart the dhcp negotiation whenever the link goes down
> and up automatically. Note that I have an interrupt callback for PHY link
> How should the dhcp be handled when the link up/down event occurs? I have
> seen many posts regarding the same, but i just wanted to make sure that we
> are doing this in the correct way. Please help.
Make sure you get from the PHY interrupt into tcpip_thread and call
dhcp_network_changed() from there. That should be all.
Is it safe to call dhcp_network_changed() from application thread ? I tried
it ans seems to be working properly. Also, should i call netif_set_down()
and netif_set_addr() before dhcp_network_changed() ?