mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #13192 from leandrolanzieri/pr/drivers/xbee_fix_ref_to_device
drivers/xbee: Fix reference to device from netif in send function
This commit is contained in:
commit
618919bb17
@ -116,12 +116,12 @@ static int xbee_adpt_send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
|||||||
hdr = (gnrc_netif_hdr_t *)pkt->data;
|
hdr = (gnrc_netif_hdr_t *)pkt->data;
|
||||||
if (hdr->flags & BCAST) {
|
if (hdr->flags & BCAST) {
|
||||||
uint16_t addr = 0xffff;
|
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");
|
DEBUG("[xbee-gnrc] send: preparing to send broadcast\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uint8_t *addr = gnrc_netif_hdr_get_dst_addr(hdr);
|
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);
|
hdr->dst_l2addr_len);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
if (res == -EOVERFLOW) {
|
if (res == -EOVERFLOW) {
|
||||||
|
Loading…
Reference in New Issue
Block a user