Skip to content
Snippets Groups Projects
Commit 78192ebb authored by daniel-k's avatar daniel-k
Browse files

at86rf2xx: detect broadcast and set NETIF flag when receiving

parent dbe64987
No related branches found
No related tags found
No related merge requests found
...@@ -187,10 +187,14 @@ static gnrc_pktsnip_t *_make_netif_hdr(uint8_t *mhr) ...@@ -187,10 +187,14 @@ static gnrc_pktsnip_t *_make_netif_hdr(uint8_t *mhr)
hdr = (gnrc_netif_hdr_t *)snip->data; hdr = (gnrc_netif_hdr_t *)snip->data;
gnrc_netif_hdr_init(hdr, src_len, dst_len); gnrc_netif_hdr_init(hdr, src_len, dst_len);
if (dst_len > 0) { if (dst_len > 0) {
hdr->flags |= GNRC_NETIF_HDR_FLAGS_BROADCAST;
tmp = 5 + dst_len; tmp = 5 + dst_len;
addr = gnrc_netif_hdr_get_dst_addr(hdr); addr = gnrc_netif_hdr_get_dst_addr(hdr);
for (int i = 0; i < dst_len; i++) { for (int i = 0; i < dst_len; i++) {
addr[i] = mhr[5 + (dst_len - i) - 1]; addr[i] = mhr[5 + (dst_len - i) - 1];
if(addr[i] != 0xff) {
hdr->flags &= ~(GNRC_NETIF_HDR_FLAGS_BROADCAST);
}
} }
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment