mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gnrc_netif: expose common init function as default
This commit is contained in:
parent
4b82a56c89
commit
09b5db28f1
@ -434,6 +434,15 @@ static inline int gnrc_netif_ipv6_group_leave(const gnrc_netif_t *netif,
|
|||||||
sizeof(ipv6_addr_t));
|
sizeof(ipv6_addr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default operation for gnrc_netif_ops_t::init()
|
||||||
|
*
|
||||||
|
* @note Can also be used to be called *before* a custom operation.
|
||||||
|
*
|
||||||
|
* @param[in] netif The network interface.
|
||||||
|
*/
|
||||||
|
void gnrc_netif_default_init(gnrc_netif_t *netif);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Default operation for gnrc_netif_ops_t::get()
|
* @brief Default operation for gnrc_netif_ops_t::get()
|
||||||
*
|
*
|
||||||
|
@ -1196,7 +1196,7 @@ static void _init_from_device(gnrc_netif_t *netif)
|
|||||||
_update_l2addr_from_dev(netif);
|
_update_l2addr_from_dev(netif);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _init(gnrc_netif_t *netif)
|
void gnrc_netif_default_init(gnrc_netif_t *netif)
|
||||||
{
|
{
|
||||||
_init_from_device(netif);
|
_init_from_device(netif);
|
||||||
#ifdef MODULE_GNRC_IPV6_NIB
|
#ifdef MODULE_GNRC_IPV6_NIB
|
||||||
@ -1361,7 +1361,7 @@ static void *_gnrc_netif_thread(void *args)
|
|||||||
_test_options(netif);
|
_test_options(netif);
|
||||||
#endif
|
#endif
|
||||||
netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
|
netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
|
||||||
_init(netif);
|
gnrc_netif_default_init(netif);
|
||||||
if (netif->ops->init) {
|
if (netif->ops->init) {
|
||||||
netif->ops->init(netif);
|
netif->ops->init(netif);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user