summaryrefslogtreecommitdiff
path: root/include/net/mac802154.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-02 23:43:03 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-11-02 23:52:02 +0300
commitf753f7eeb4178ab8eeaf513a4fdf1c20ddf40474 (patch)
tree97dae5215789bf41c3a862cb05f0efc939ef82f0 /include/net/mac802154.h
parentc28bee84c5c49312befe1b442e1044ac2392d80d (diff)
downloadlinux-f753f7eeb4178ab8eeaf513a4fdf1c20ddf40474.tar.xz
mac802154: fix byteorder issues
Running make C=2 occurs these warnings: cast from restricted __be64 incorrect type in argument 1 (different base types) expected unsigned long long[unsigned] [usertype] val got restricted __be64 [usertype]<noident> cast from restricted __be64 cast to restricted __le64 This patch fix these warnings by forcing to __le64 type and using swabp64 instead swab64. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/mac802154.h')
-rw-r--r--include/net/mac802154.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index c17acbd0dadc..8b0c26bc0762 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -215,12 +215,12 @@ struct ieee802154_ops {
};
/**
- * ieee802154_netdev_to_extended_addr - convert __be64 u8 pointer to __le64
+ * 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
*/
-static inline __le64 ieee802154_netdev_to_extended_addr(const u8 *dev_addr)
+static inline __le64 ieee802154_netdev_to_extended_addr(const void *dev_addr)
{
- return (__le64)swab64(*((__be64 *)dev_addr));
+ return (__force __le64)swab64p(dev_addr);
}
/* Basic interface to register ieee802154 hwice */