sim/netdev: Update IFF_RUNNING flag by netdev_carrier_on and netdev_carrier_off
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
19e748f278
commit
b03886415f
@ -283,11 +283,13 @@ static int netdriver_ifup(FAR struct net_driver_s *dev)
|
||||
{
|
||||
netdev_ifup(dev->d_ipaddr);
|
||||
work_queue(LPWORK, &g_timer_work, netdriver_timer_work, dev, CLK_TCK);
|
||||
netdev_carrier_on(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int netdriver_ifdown(FAR struct net_driver_s *dev)
|
||||
{
|
||||
netdev_carrier_off(dev);
|
||||
work_cancel(LPWORK, &g_timer_work);
|
||||
netdev_ifdown();
|
||||
return OK;
|
||||
|
Loading…
Reference in New Issue
Block a user