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
commit 8b7d08f59ab9953e5db334f48a4dc5dd1208627f Author: Xiang Xiao <[email protected]> AuthorDate: Sat Mar 12 14:16:00 2022 +0800 net: Reoder the initialize sequence(mac->ip->tcp/udp) Signed-off-by: Xiang Xiao <[email protected]> --- net/net_initialize.c | 74 ++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/net/net_initialize.c b/net/net_initialize.c index 23c6912..0fa2536 100644 --- a/net/net_initialize.c +++ b/net/net_initialize.c @@ -75,64 +75,70 @@ void net_initialize(void) { -#ifdef CONFIG_NET_IPv6 -#ifdef CONFIG_NET_6LOWPAN - /* Initialize 6LoWPAN data structures */ + /* Initialize the device interface layer */ - sixlowpan_initialize(); + devif_initialize(); + +#ifdef CONFIG_NET_BLUETOOTH + /* Initialize Bluetooth socket support */ + + bluetooth_initialize(); #endif -#endif /* CONFIG_NET_IPv6 */ - /* Initialize the device interface layer */ +#ifdef CONFIG_NET_CAN + /* Initialize SocketCAN support */ - devif_initialize(); + can_initialize(); +#endif -#ifdef HAVE_FWDALLOC - /* Initialize IP forwarding support */ +#ifdef CONFIG_NET_IEEE802154 + /* Initialize IEEE 802.15.4 socket support */ - ipfwd_initialize(); + ieee802154_initialize(); #endif -#ifdef CONFIG_NET_PKT - /* Initialize packet socket support */ +#ifdef CONFIG_NET_NETLINK + /* Initialize the Netlink IPC support */ - pkt_initialize(); + netlink_initialize(); #endif -#ifdef CONFIG_NET_ICMP_SOCKET - /* Initialize IPPPROTO_ICMP socket support */ +#ifdef CONFIG_NET_PKT + /* Initialize packet socket support */ - icmp_sock_initialize(); + pkt_initialize(); #endif -#ifdef CONFIG_NET_ICMPv6_SOCKET - /* Initialize IPPPROTO_ICMP6 socket support */ +#ifdef CONFIG_NET_ROUTE + /* Initialize the routing table */ - icmpv6_sock_initialize(); + net_init_route(); #endif -#ifdef CONFIG_NET_BLUETOOTH - /* Initialize Bluetooth socket support */ +#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_6LOWPAN + /* Initialize 6LoWPAN data structures */ - bluetooth_initialize(); + sixlowpan_initialize(); #endif +#endif /* CONFIG_NET_IPv6 */ -#ifdef CONFIG_NET_IEEE802154 - /* Initialize IEEE 802.15.4 socket support */ +#ifdef HAVE_FWDALLOC + /* Initialize IP forwarding support */ - ieee802154_initialize(); + ipfwd_initialize(); #endif -#ifdef CONFIG_NET_CAN - /* Initialize SocketCAN support */ +#ifdef CONFIG_NET_ICMP_SOCKET + /* Initialize IPPPROTO_ICMP socket support */ - can_initialize(); + icmp_sock_initialize(); #endif -#ifdef CONFIG_NET_NETLINK - /* Initialize the Netlink IPC support */ +#ifdef CONFIG_NET_ICMPv6_SOCKET + /* Initialize IPPPROTO_ICMP6 socket support */ - netlink_initialize(); + icmpv6_sock_initialize(); #endif #ifdef NET_TCP_HAVE_STACK @@ -157,12 +163,6 @@ void net_initialize(void) #endif #endif -#ifdef CONFIG_NET_ROUTE - /* Initialize the routing table */ - - net_init_route(); -#endif - #ifdef CONFIG_NET_USRSOCK /* Initialize the user-space socket API */
