[riot-notifications] [RIOT] Refactor 6LoWPAN module (#133)

Oleg Hahm notifications at github.com
Wed Aug 14 15:48:14 CEST 2013


> @@ -113,13 +179,15 @@ void lowpan_init(ieee_802154_long_t *addr, uint8_t *data)
>  
>          memcpy(fragbuf + 4, data, max_frag_initial);
>  
> -        fragbuf[0] = (((0xc0 << 8) | packet_length) >> 8) & 0xff;
> -        fragbuf[1] = ((0xc0 << 8) | packet_length) & 0xff;
> +        fragbuf[0] = (((SIXLOWPAN_FRAG1_DISPATCH << 8) | packet_length) >> 8) & 0xff;
> +        fragbuf[1] = ((SIXLOWPAN_FRAG1_DISPATCH << 8) | packet_length) & 0xff;

A binary *AND* with `0xff` for a single byte has no effect.

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


More information about the notifications mailing list