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:
parent
e63e083a2f
commit
348b9b0d35
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user