net: Reoder the initialize sequence(mac->ip->tcp/udp)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
7598070508
commit
8b7d08f59a
@ -75,6 +75,46 @@
|
||||
|
||||
void net_initialize(void)
|
||||
{
|
||||
/* Initialize the device interface layer */
|
||||
|
||||
devif_initialize();
|
||||
|
||||
#ifdef CONFIG_NET_BLUETOOTH
|
||||
/* Initialize Bluetooth socket support */
|
||||
|
||||
bluetooth_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_CAN
|
||||
/* Initialize SocketCAN support */
|
||||
|
||||
can_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IEEE802154
|
||||
/* Initialize IEEE 802.15.4 socket support */
|
||||
|
||||
ieee802154_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_NETLINK
|
||||
/* Initialize the Netlink IPC support */
|
||||
|
||||
netlink_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_PKT
|
||||
/* Initialize packet socket support */
|
||||
|
||||
pkt_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_ROUTE
|
||||
/* Initialize the routing table */
|
||||
|
||||
net_init_route();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
/* Initialize 6LoWPAN data structures */
|
||||
@ -83,22 +123,12 @@ void net_initialize(void)
|
||||
#endif
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
/* Initialize the device interface layer */
|
||||
|
||||
devif_initialize();
|
||||
|
||||
#ifdef HAVE_FWDALLOC
|
||||
/* Initialize IP forwarding support */
|
||||
|
||||
ipfwd_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_PKT
|
||||
/* Initialize packet socket support */
|
||||
|
||||
pkt_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_ICMP_SOCKET
|
||||
/* Initialize IPPPROTO_ICMP socket support */
|
||||
|
||||
@ -111,30 +141,6 @@ void net_initialize(void)
|
||||
icmpv6_sock_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_BLUETOOTH
|
||||
/* Initialize Bluetooth socket support */
|
||||
|
||||
bluetooth_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IEEE802154
|
||||
/* Initialize IEEE 802.15.4 socket support */
|
||||
|
||||
ieee802154_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_CAN
|
||||
/* Initialize SocketCAN support */
|
||||
|
||||
can_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_NETLINK
|
||||
/* Initialize the Netlink IPC support */
|
||||
|
||||
netlink_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef NET_TCP_HAVE_STACK
|
||||
/* Initialize the TCP/IP connection structures */
|
||||
|
||||
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user