mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
6lowpan: move eui64 uncompress function
This function will be use in later functionality in other branches than generic 6lowpan, so we move it to the global 6lowpan header. Signed-off-by: Alexander Aring <[email protected]> Reviewed-by: Stefan Schmidt<[email protected]> Acked-by: Jukka Rissanen <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
2bc068c3d6
commit
a5862f2aba
2 changed files with 16 additions and 16 deletions
|
|
@ -156,22 +156,6 @@
|
|||
#define LOWPAN_IPHC_CID_DCI(cid) (cid & 0x0f)
|
||||
#define LOWPAN_IPHC_CID_SCI(cid) ((cid & 0xf0) >> 4)
|
||||
|
||||
static inline void lowpan_iphc_uncompress_eui64_lladdr(struct in6_addr *ipaddr,
|
||||
const void *lladdr)
|
||||
{
|
||||
/* fe:80::XXXX:XXXX:XXXX:XXXX
|
||||
* \_________________/
|
||||
* hwaddr
|
||||
*/
|
||||
ipaddr->s6_addr[0] = 0xFE;
|
||||
ipaddr->s6_addr[1] = 0x80;
|
||||
memcpy(&ipaddr->s6_addr[8], lladdr, EUI64_ADDR_LEN);
|
||||
/* second bit-flip (Universe/Local)
|
||||
* is done according RFC2464
|
||||
*/
|
||||
ipaddr->s6_addr[8] ^= 0x02;
|
||||
}
|
||||
|
||||
static inline void
|
||||
lowpan_iphc_uncompress_802154_lladdr(struct in6_addr *ipaddr,
|
||||
const void *lladdr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue