This patch fix byteorder issues which occurs because we compare __le64
with an host byteorder value. Simple add a cpu_to_le64 to convert the
host byteorder values to __le64.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
#define LINUX_IEEE802154_H
#include <linux/types.h>
+#include <asm/byteorder.h>
#define IEEE802154_MTU 127
#define IEEE802154_MIN_PSDU_LEN 5
* This is currently a workaround because neighbor discovery can't
* deal with short addresses types right now.
*/
- return ((addr != 0x0000000000000000ULL) ||
- (addr != 0xffffffffffffffffULL));
+ return ((addr != cpu_to_le64(0x0000000000000000ULL)) ||
+ (addr != cpu_to_le64(0xffffffffffffffffULL)));
}
#endif /* LINUX_IEEE802154_H */