未验证 提交 88858f21 编写于 作者: D David Lin 提交者: GitHub

Update ethernetif.c

上级 9dc0bbb8
......@@ -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)
{
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;
}
#endif /* RT_LWIP_DHCP */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册