net: Remove IFF_DOWN flag to compatible with Linux/*BSD

turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2024-10-06 15:15:56 +08:00
committed by GUIDINGLI
parent 4df19fd6c5
commit 77821fb7eb
4 changed files with 3 additions and 8 deletions
+1 -4
View File
@@ -990,10 +990,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
arp_acd_setup(dev);
#endif /* CONFIG_NET_ARP_ACD */
}
/* Is this a request to take the interface down? */
else if ((req->ifr_flags & IFF_DOWN) != 0)
else
{
/* Yes.. take the interface down */