lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] DHCP and Ethernet disconnection


From: Vinu Gopalakrishnan
Subject: Re: [lwip-users] DHCP and Ethernet disconnection
Date: Tue, 10 Dec 2019 16:29:23 +0530

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

 www.linkedin.com/in/vinu-gopalakrishnan


On Tue, Dec 10, 2019 at 4:25 PM Sylvain Rochet <address@hidden> 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
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]