mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user