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
+2
View File
@@ -2189,6 +2189,7 @@ static int lan9250_ifup(FAR struct net_driver_s *dev)
(uint8_t)(mac_addr[0] >> 24), (uint8_t)(mac_addr[0] >> 16),
(uint8_t)(mac_addr[0] >> 8), (uint8_t)(mac_addr[0] >> 0));
#endif
netdev_carrier_on(dev);
}
/* Un-lock the SPI bus */
@@ -2240,6 +2241,7 @@ static int lan9250_ifdown(FAR struct net_driver_s *dev)
IFF_CLR_UP(priv->dev.d_flags);
leave_critical_section(flags);
netdev_carrier_off(dev);
/* Un-lock the SPI bus */