gnrc: use gnrc_netif_default_init() for all implementations
This commit is contained in:
parent
09b5db28f1
commit
14a2f6bc18
@ -192,6 +192,7 @@ err:
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t _esp_now_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _send,
|
||||
.recv = _recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -173,6 +173,7 @@ static gnrc_pktsnip_t *gnrc_nrfmin_recv(gnrc_netif_t *dev)
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t gnrc_nrfmin_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = gnrc_nrfmin_send,
|
||||
.recv = gnrc_nrfmin_recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -159,6 +159,7 @@ static int cc1xxx_adpt_send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t cc1xxx_netif_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = cc1xxx_adpt_send,
|
||||
.recv = cc1xxx_adpt_recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -160,6 +160,7 @@ static int xbee_adpt_send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t _xbee_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = xbee_adpt_send,
|
||||
.recv = xbee_adpt_recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -90,6 +90,7 @@ static void _netif_init(gnrc_netif_t *netif)
|
||||
{
|
||||
(void)netif;
|
||||
|
||||
gnrc_netif_default_init(netif);
|
||||
/* save the threads context pointer, so we can set its flags */
|
||||
_netif_thread = (thread_t *)thread_get(thread_getpid());
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ static void _netif_msg_handler(gnrc_netif_t *netif, msg_t *msg)
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t _ble_ops = {
|
||||
.init = NULL,
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _netif_send,
|
||||
.recv = _netif_recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -2108,6 +2108,7 @@ static void _gomach_init(gnrc_netif_t *netif)
|
||||
{
|
||||
netdev_t *dev;
|
||||
|
||||
gnrc_netif_default_init(netif);
|
||||
dev = netif->dev;
|
||||
dev->event_callback = _gomach_event_cb;
|
||||
|
||||
|
||||
@ -901,6 +901,7 @@ static void _lwmac_init(gnrc_netif_t *netif)
|
||||
{
|
||||
netdev_t *dev;
|
||||
|
||||
gnrc_netif_default_init(netif);
|
||||
dev = netif->dev;
|
||||
dev->event_callback = _lwmac_event_cb;
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif);
|
||||
static char addr_str[ETHERNET_ADDR_LEN * 3];
|
||||
|
||||
static const gnrc_netif_ops_t ethernet_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _send,
|
||||
.recv = _recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -1361,7 +1361,6 @@ static void *_gnrc_netif_thread(void *args)
|
||||
_test_options(netif);
|
||||
#endif
|
||||
netif->cur_hl = GNRC_NETIF_DEFAULT_HL;
|
||||
gnrc_netif_default_init(netif);
|
||||
if (netif->ops->init) {
|
||||
netif->ops->init(netif);
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt);
|
||||
static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif);
|
||||
|
||||
static const gnrc_netif_ops_t raw_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _send,
|
||||
.recv = _recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -32,6 +32,7 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt);
|
||||
static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif);
|
||||
|
||||
static const gnrc_netif_ops_t ieee802154_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _send,
|
||||
.recv = _recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -1221,6 +1221,7 @@ static int _test_netif_set(gnrc_netif_t *netif, const gnrc_netapi_opt_t *opt)
|
||||
}
|
||||
|
||||
static const gnrc_netif_ops_t _test_netif_ops = {
|
||||
.init = gnrc_netif_default_init,
|
||||
.send = _test_netif_send,
|
||||
.recv = _test_netif_recv,
|
||||
.get = gnrc_netif_get_from_netdev,
|
||||
|
||||
@ -106,6 +106,7 @@ static void _set_up(void)
|
||||
static inline void _test_init(gnrc_netif_t *netif)
|
||||
{
|
||||
(void)netif;
|
||||
gnrc_netif_default_init(netif);
|
||||
init_called = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user