mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #209 from BytesGalore/fix_payload_offset
Fix payload offset
This commit is contained in:
commit
2f5c28bf46
@ -230,7 +230,7 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame,
|
|||||||
|
|
||||||
frame->payload = (buf + index);
|
frame->payload = (buf + index);
|
||||||
hdrlen = index;
|
hdrlen = index;
|
||||||
frame->payload_len = (len - hdrlen);
|
frame->payload_len = (len - hdrlen - IEEE_802154_FCS_LEN);
|
||||||
|
|
||||||
return hdrlen;
|
return hdrlen;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ void recv_ieee802154_frame(void)
|
|||||||
|
|
||||||
p = (radio_packet_t *) m.content.ptr;
|
p = (radio_packet_t *) m.content.ptr;
|
||||||
hdrlen = ieee802154_frame_read(p->data, &frame, p->length);
|
hdrlen = ieee802154_frame_read(p->data, &frame, p->length);
|
||||||
length = p->length - hdrlen;
|
length = p->length - hdrlen - IEEE_802154_FCS_LEN;
|
||||||
|
|
||||||
/* deliver packet to network(6lowpan)-layer */
|
/* deliver packet to network(6lowpan)-layer */
|
||||||
lowpan_read(frame.payload, length, (ieee_802154_long_t *)&frame.src_addr,
|
lowpan_read(frame.payload, length, (ieee_802154_long_t *)&frame.src_addr,
|
||||||
|
Loading…
Reference in New Issue
Block a user