mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-19 08:03:30 +08:00
Update ethernetif.c
This commit is contained in:
parent
9dc0bbb814
commit
88858f216c
@ -156,6 +156,16 @@ static int lwip_netdev_set_dns_server(struct netdev *netif, uint8_t dns_num, ip_
|
|||||||
static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
|
static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
|
||||||
{
|
{
|
||||||
netdev_low_level_set_dhcp_status(netif, is_enabled);
|
netdev_low_level_set_dhcp_status(netif, is_enabled);
|
||||||
|
|
||||||
|
if(RT_TRUE == is_enabled)
|
||||||
|
{
|
||||||
|
dhcp_start((struct netif *)netif->user_data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dhcp_stop((struct netif *)netif->user_data);
|
||||||
|
}
|
||||||
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
#endif /* RT_LWIP_DHCP */
|
#endif /* RT_LWIP_DHCP */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user