From 40794cf5f11c8d11ddbfa394907f239fe765ab41 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Thu, 23 Jan 2020 18:11:17 +0100 Subject: [PATCH] drivers/xbee: Fix reference to device from netif in send function --- drivers/xbee/gnrc_xbee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xbee/gnrc_xbee.c b/drivers/xbee/gnrc_xbee.c index 04365ee072..20476dc6fd 100644 --- a/drivers/xbee/gnrc_xbee.c +++ b/drivers/xbee/gnrc_xbee.c @@ -116,12 +116,12 @@ static int xbee_adpt_send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) hdr = (gnrc_netif_hdr_t *)pkt->data; if (hdr->flags & BCAST) { uint16_t addr = 0xffff; - res = xbee_build_hdr((xbee_t *)netif, xhdr, size, &addr, 2); + res = xbee_build_hdr((xbee_t *)netif->dev, xhdr, size, &addr, 2); DEBUG("[xbee-gnrc] send: preparing to send broadcast\n"); } else { uint8_t *addr = gnrc_netif_hdr_get_dst_addr(hdr); - res = xbee_build_hdr((xbee_t *)netif, xhdr, size, addr, + res = xbee_build_hdr((xbee_t *)netif->dev, xhdr, size, addr, hdr->dst_l2addr_len); if (res < 0) { if (res == -EOVERFLOW) {