Yes. That is correct. I didn't mean to call them in interrupt context anyway.
Thanks, Vinu Gopalakrishnan Sr. Software Engineer Gadgeon Smart Systems m: +91-9526481318 [image: www.linkedin.com/in/vinu-gopalakrishnan] <https://www.linkedin.com/in/vinu-gopalakrishnan-bbb944100/> On Tue, Dec 10, 2019 at 4:25 PM Sylvain Rochet <grada...@gradator.net> wrote: > 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 > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users