netdev_driver: add carrier_on to xxx_ifup where carrier_on is absent

since the judgment for network card selection was changed from IS_UP to
IS_RUNNING, drivers that lack carrier_on need to add the carrier_on
operation; otherwise, network access issues will occur.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2026-01-28 22:01:27 +08:00
committed by Donny(董九柱)
parent 2ec1bff4e3
commit a7567677a8
53 changed files with 279 additions and 9 deletions

View File

@@ -680,6 +680,7 @@ static int xbeenet_ifup(FAR struct net_driver_s *dev)
priv->xd_bifup = true;
ret = OK;
netdev_carrier_on(dev);
}
return ret;
@@ -720,6 +721,9 @@ static int xbeenet_ifdown(FAR struct net_driver_s *dev)
priv->xd_bifup = false;
leave_critical_section(flags);
netdev_carrier_off(dev);
return OK;
}

View File

@@ -1777,6 +1777,7 @@ static int spirit_ifup(FAR struct net_driver_s *dev)
/* We are up! */
priv->ifup = true;
netdev_carrier_on(dev);
}
return OK;
@@ -1875,6 +1876,7 @@ static int spirit_ifdown(FAR struct net_driver_s *dev)
}
priv->ifup = false;
netdev_carrier_off(dev);
}
return ret;