1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #307 from OlegHahm/ieee802154_frame_recv

fixed byte order in reception of IEEE802.15.4 frames
This commit is contained in:
Oleg Hahm 2013-11-19 12:26:03 -08:00
commit 279a11cde7

View File

@ -148,12 +148,6 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame,
uint8_t index = 0;
uint8_t hdrlen;
frame->fcf.dest_addr_m = (buf[index] >> 2) & 0x03;
frame->fcf.frame_ver = (buf[index] >> 4) & 0x03;
frame->fcf.src_addr_m = (buf[index] >> 6) & 0x03;
index++;
frame->fcf.frame_type = (buf[index]) & 0x07;
frame->fcf.sec_enb = (buf[index] >> 3) & 0x01;
frame->fcf.frame_pend = (buf[index] >> 4) & 0x01;
@ -162,6 +156,12 @@ uint8_t ieee802154_frame_read(uint8_t *buf, ieee802154_frame_t *frame,
index++;
frame->fcf.dest_addr_m = (buf[index] >> 2) & 0x03;
frame->fcf.frame_ver = (buf[index] >> 4) & 0x03;
frame->fcf.src_addr_m = (buf[index] >> 6) & 0x03;
index++;
frame->seq_nr = buf[index];
index++;