ieee802154: add short address helpers

This patch introduce some short address handling functionality into
ieee802154 headers.

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Alexander Aring
2016-04-11 11:04:15 +02:00
committed by Marcel Holtmann
parent b7594148c7
commit 118a5cf8ae
2 changed files with 39 additions and 0 deletions

View File

@@ -287,6 +287,16 @@ static inline void ieee802154_le16_to_be16(void *be16_dst, const void *le16_src)
put_unaligned_be16(get_unaligned_le16(le16_src), be16_dst);
}
/**
* ieee802154_be16_to_le16 - copies and convert be16 to le16
* @le16_dst: le16 destination pointer
* @be16_src: be16 source pointer
*/
static inline void ieee802154_be16_to_le16(void *le16_dst, const void *be16_src)
{
put_unaligned_le16(get_unaligned_be16(be16_src), le16_dst);
}
/**
* ieee802154_alloc_hw - Allocate a new hardware device
*