mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-06 21:44:34 +08:00
fixed wlan driver dhcp multitask safety
This commit is contained in:
parent
9d7ac2f94a
commit
039e2ff530
@ -170,7 +170,7 @@ static void netif_set_connected(void *parameter)
|
|||||||
LOG_D("F:%s L:%d dhcp start run", __FUNCTION__, __LINE__);
|
LOG_D("F:%s L:%d dhcp start run", __FUNCTION__, __LINE__);
|
||||||
netifapi_netif_common(eth_dev->netif, netif_set_link_up, NULL);
|
netifapi_netif_common(eth_dev->netif, netif_set_link_up, NULL);
|
||||||
#ifdef RT_LWIP_DHCP
|
#ifdef RT_LWIP_DHCP
|
||||||
dhcp_start(eth_dev->netif);
|
netifapi_dhcp_start(eth_dev->netif);
|
||||||
#endif
|
#endif
|
||||||
rt_timer_start(&lwip_prot->timer);
|
rt_timer_start(&lwip_prot->timer);
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ static void netif_set_connected(void *parameter)
|
|||||||
#ifdef RT_LWIP_DHCP
|
#ifdef RT_LWIP_DHCP
|
||||||
{
|
{
|
||||||
ip_addr_t ip_addr = { 0 };
|
ip_addr_t ip_addr = { 0 };
|
||||||
dhcp_stop(eth_dev->netif);
|
netifapi_dhcp_stop(eth_dev->netif);
|
||||||
netif_set_addr(eth_dev->netif, &ip_addr, &ip_addr, &ip_addr);
|
netif_set_addr(eth_dev->netif, &ip_addr, &ip_addr, &ip_addr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user