You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/19 08:09:22 UTC
[incubator-nuttx] branch master updated: wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 463f321316 wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
463f321316 is described below
commit 463f321316eaed0a828c73ac337c761a1d396225
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jul 18 18:19:55 2022 +0800
wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
since IFF_DOWN is only used for request, not for status. Instead,
IFF_UP should be used to query the netdev status. The IFF_DOWN
related macros are also removed to avoid the confuse.
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
include/net/if.h | 3 ---
wireless/ieee802154/mac802154_netdev.c | 1 -
2 files changed, 4 deletions(-)
diff --git a/include/net/if.h b/include/net/if.h
index 15751e744d..56525768d7 100644
--- a/include/net/if.h
+++ b/include/net/if.h
@@ -59,7 +59,6 @@
/* Interface flag helpers */
-#define IFF_SET_DOWN(f) do { (f) |= IFF_DOWN; } while (0)
#define IFF_SET_UP(f) do { (f) |= IFF_UP; } while (0)
#define IFF_SET_RUNNING(f) do { (f) |= IFF_RUNNING; } while (0)
#define IFF_SET_BOUND(f) do { (f) |= IFF_BOUND; } while (0)
@@ -69,7 +68,6 @@
#define IFF_SET_MULTICAST(f) do { (f) |= IFF_MULTICAST; } while (0)
#define IFF_SET_BROADCAST(f) do { (f) |= IFF_BROADCAST; } while (0)
-#define IFF_CLR_DOWN(f) do { (f) &= ~IFF_DOWN; } while (0)
#define IFF_CLR_UP(f) do { (f) &= ~IFF_UP; } while (0)
#define IFF_CLR_RUNNING(f) do { (f) &= ~IFF_RUNNING; } while (0)
#define IFF_CLR_BOUND(f) do { (f) &= ~IFF_BOUND; } while (0)
@@ -79,7 +77,6 @@
#define IFF_CLR_MULTICAST(f) do { (f) &= ~IFF_MULTICAST; } while (0)
#define IFF_CLR_BROADCAST(f) do { (f) &= ~IFF_BROADCAST; } while (0)
-#define IFF_IS_DOWN(f) (((f) & IFF_DOWN) != 0)
#define IFF_IS_UP(f) (((f) & IFF_UP) != 0)
#define IFF_IS_RUNNING(f) (((f) & IFF_RUNNING) != 0)
#define IFF_IS_BOUND(f) (((f) & IFF_BOUND) != 0)
diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c
index 74f8e15c7c..b62c0f02db 100644
--- a/wireless/ieee802154/mac802154_netdev.c
+++ b/wireless/ieee802154/mac802154_netdev.c
@@ -1334,7 +1334,6 @@ int mac802154netdev_register(MACHANDLE mac)
* it up
*/
- dev->d_flags = IFF_DOWN;
return macnet_ifdown(&priv->md_dev.r_dev);
errout: