Beispiel #1
0
static int net_init(struct device *unused)
{
	int status = 0;

	NET_DBG("Priority %d", CONFIG_NET_INIT_PRIO);

	net_shell_init();

	net_pkt_init();

	net_context_init();

	l2_init();
	l3_init();

	net_mgmt_event_init();

	init_rx_queue();

#if CONFIG_NET_DHCPV4
	status = dhcpv4_init();
	if (status) {
		return status;
	}
#endif

	return status;
}
Beispiel #2
0
int net_init(void)
{
	static uint8_t initialized;

	if (initialized)
		return -EALREADY;

	initialized = 1;

	net_context_init();
	net_buf_init();
	init_tx_queue();
	init_rx_queue();

#if defined (CONFIG_NETWORKING_WITH_15_4)
	net_driver_15_4_init();
#endif

	net_driver_slip_init();

	return network_initialization();
}