Hi, On Tue, Dec 10, 2019 at 04:13:33PM +0530, Vinu Gopalakrishnan wrote: > Hi Giuseppe, > > You have to enable your PHY interrupt and on interrupt , read the PHY > registers and verify that the physical link is down. Then intimate the > stack that link has gone down using the netif_set_link_down. Then can > dhcp_network_changed().
This is confusing, never call netif_set_link_*() from interrupt context, those calls are not thread nor interrupt safe. You can either use PHY interrupt then signal your main loop in some way to call netif_set_link_*(), or periodically poll the PHY status in the main loop. OS users should use the netifapi API: netif_set_link_*(). Sylvain
signature.asc
Description: Digital signature
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users