mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_netif_ieee802154: propagate pend. frame flag to stack
This way we can re-use the flag e.g. for forwarding
This commit is contained in:
parent
8da4957cdd
commit
eac066a1e5
@ -48,6 +48,7 @@ gnrc_netif_t *gnrc_netif_ieee802154_create(char *stack, int stacksize,
|
||||
|
||||
static gnrc_pktsnip_t *_make_netif_hdr(uint8_t *mhr)
|
||||
{
|
||||
gnrc_netif_hdr_t *hdr;
|
||||
gnrc_pktsnip_t *snip;
|
||||
uint8_t src[IEEE802154_LONG_ADDRESS_LEN], dst[IEEE802154_LONG_ADDRESS_LEN];
|
||||
int src_len, dst_len;
|
||||
@ -65,11 +66,15 @@ static gnrc_pktsnip_t *_make_netif_hdr(uint8_t *mhr)
|
||||
DEBUG("_make_netif_hdr: no space left in packet buffer\n");
|
||||
return NULL;
|
||||
}
|
||||
hdr = snip->data;
|
||||
/* set broadcast flag for broadcast destination */
|
||||
if ((dst_len == 2) && (dst[0] == 0xff) && (dst[1] == 0xff)) {
|
||||
gnrc_netif_hdr_t *hdr = snip->data;
|
||||
hdr->flags |= GNRC_NETIF_HDR_FLAGS_BROADCAST;
|
||||
}
|
||||
/* set flags for pending frames */
|
||||
if (mhr[0] & IEEE802154_FCF_FRAME_PEND) {
|
||||
hdr->flags |= GNRC_NETIF_HDR_FLAGS_MORE_DATA;
|
||||
}
|
||||
return snip;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user