[riot-notifications] [RIOT] fixed byte order in network stack (#259)

Oleg Hahm notifications at github.com
Sat Nov 2 22:23:22 CET 2013


>      /* Sequence Number - 802.15.4 - 2006 - 7.2.1.2 */
>      buf[index] = frame->seq_nr;
>      index++;
>  
>      /* Destination PAN Identifier - 802.15.4 - 2006 - 7.2.1.3 */
>      if (frame->fcf.dest_addr_m == 0x02 || frame->fcf.dest_addr_m == 0x03) {
> -        buf[index] = ((frame->dest_pan_id >> 8) & 0xff);
> -        buf[index + 1] = (frame->dest_pan_id & 0xff);
> +        buf[index + 1] = ((frame->dest_pan_id >> 8) & 0xff);
> +        buf[index] = (frame->dest_pan_id & 0xff);

memcpy is too expensive.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/259/files#r7388832
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20131102/718aa6f9/attachment.html>


More information about the notifications mailing list