/* Register Ethernet media type with TIPC bearer code. Also register with OS for notifications about device state changes.  */
int tipc_eth_media_start(void)
/* Register Ethernet media type with TIPC bearer code. Also register with OS for notifications about device state changes.  */
int tipc_eth_media_start(void)
{
	struct tipc_media_addr bcast_addr;
	int res;
	if (eth_started)
		return -EINVAL;
	bcast_addr.type = htonl(TIPC_MEDIA_TYPE_ETH);
	memset(&bcast_addr.dev_addr, 0xff, ETH_ALEN);
	memset(eth_bearers, 0, sizeof(eth_bearers));
	res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth",
				  enable_bearer, disable_bearer, send_msg,
				  eth_addr2str, &bcast_addr, ETH_LINK_PRIORITY,
				  ETH_LINK_TOLERANCE, ETH_LINK_WINDOW);
	if (res)
		return res;
	notifier.notifier_call = &recv_notification;
	notifier.priority = 0;
	res = register_netdevice_notifier(&notifier);
	if (!res)
		eth_started = 1;
	return res;
}