netdev:When running, proto stack can exchange packets with device

netdev:when network device is running status,the network protocol stack is allowed to send packet to the network device and to receive from the network device

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen
2024-12-16 10:32:49 +08:00
committed by Xiang Xiao
parent 2a60b7e747
commit c2774ba1ec
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ FAR struct net_driver_s *netdev_default(void)
netdev_list_lock();
for (dev = g_netdevices; dev; dev = dev->flink)
{
/* Is the interface in the "up" state? */
/* Is the interface in the "running" state? */
if ((dev->d_flags & IFF_UP) != 0)
if (IFF_IS_RUNNING(dev->d_flags) != 0)
{
/* Return a reference to the first device that we find in the UP
* state (but not the loopback device unless it is the only