net/slip: 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:
Xiang Xiao 2021-12-21 16:38:47 +08:00 committed by Gustavo Henrique Nihei
parent e63e083a2f
commit 348b9b0d35

View File

@ -818,6 +818,7 @@ static int slip_ifup(FAR struct net_driver_s *dev)
/* Mark the interface up */
priv->bifup = true;
netdev_carrier_on(dev);
return OK;
}
@ -842,6 +843,8 @@ static int slip_ifdown(FAR struct net_driver_s *dev)
FAR struct slip_driver_s *priv =
(FAR struct slip_driver_s *)dev->d_private;
netdev_carrier_off(dev);
/* Mark the device "down" */
priv->bifup = false;