diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-11-05 20:51:24 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-05 21:53:05 +0100 |
commit | 705cbbbe9ccca260658f971a4369c22f5704db75 (patch) | |
tree | 2dd83c1c2334a2c80502085a6ebeaa3d6e434213 /include/net/mac802154.h | |
parent | 239a84a9a0bcbc7214eb93fb3ba76962de846239 (diff) | |
download | linux-705cbbbe9ccca260658f971a4369c22f5704db75.tar.gz linux-705cbbbe9ccca260658f971a4369c22f5704db75.tar.bz2 linux-705cbbbe9ccca260658f971a4369c22f5704db75.zip |
mac802154: cleanup ieee802154_netdev_to_extended_addr
This patch cleanups the ieee802154_be64_to_le64 to have a similar
function like ieee802154_le64_to_be64 only with switched source and
destionation types.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/mac802154.h')
-rw-r--r-- | include/net/mac802154.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index cc188cb4f94d..632f6566adb5 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h @@ -224,12 +224,15 @@ struct ieee802154_ops { }; /** - * ieee802154_netdev_to_extended_addr - convert big endian 64 byte void pointer to __le64 - * @dev_addr: big endian address pointer like netdevice dev_addr attribute + * ieee802154_be64_to_le64 - copies and convert be64 to le64 + * @le64_dst: le64 destination pointer + * @be64_src: be64 source pointer */ -static inline __le64 ieee802154_netdev_to_extended_addr(const void *dev_addr) +static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src) { - return (__force __le64)swab64p(dev_addr); + __le64 tmp = (__force __le64)swab64p(be64_src); + + memcpy(le64_dst, &tmp, IEEE802154_EXTENDED_ADDR_LEN); } /** |