diff options
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r-- | include/net/addrconf.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 50e39a8822b4..933a9f22a05f 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -314,7 +314,7 @@ static inline bool ipv6_addr_is_multicast(const struct in6_addr *addr) | |||
314 | static inline bool ipv6_addr_is_ll_all_nodes(const struct in6_addr *addr) | 314 | static inline bool ipv6_addr_is_ll_all_nodes(const struct in6_addr *addr) |
315 | { | 315 | { |
316 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 | 316 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 |
317 | __u64 *p = (__u64 *)addr; | 317 | __be64 *p = (__be64 *)addr; |
318 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | (p[1] ^ cpu_to_be64(1))) == 0UL; | 318 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | (p[1] ^ cpu_to_be64(1))) == 0UL; |
319 | #else | 319 | #else |
320 | return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | | 320 | return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | |
@@ -326,7 +326,7 @@ static inline bool ipv6_addr_is_ll_all_nodes(const struct in6_addr *addr) | |||
326 | static inline bool ipv6_addr_is_ll_all_routers(const struct in6_addr *addr) | 326 | static inline bool ipv6_addr_is_ll_all_routers(const struct in6_addr *addr) |
327 | { | 327 | { |
328 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 | 328 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 |
329 | __u64 *p = (__u64 *)addr; | 329 | __be64 *p = (__be64 *)addr; |
330 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | (p[1] ^ cpu_to_be64(2))) == 0UL; | 330 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | (p[1] ^ cpu_to_be64(2))) == 0UL; |
331 | #else | 331 | #else |
332 | return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | | 332 | return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | |
@@ -343,7 +343,7 @@ static inline bool ipv6_addr_is_isatap(const struct in6_addr *addr) | |||
343 | static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr) | 343 | static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr) |
344 | { | 344 | { |
345 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 | 345 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 |
346 | __u64 *p = (__u64 *)addr; | 346 | __be64 *p = (__be64 *)addr; |
347 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | | 347 | return ((p[0] ^ cpu_to_be64(0xff02000000000000UL)) | |
348 | ((p[1] ^ cpu_to_be64(0x00000001ff000000UL)) & | 348 | ((p[1] ^ cpu_to_be64(0x00000001ff000000UL)) & |
349 | cpu_to_be64(0xffffffffff000000UL))) == 0UL; | 349 | cpu_to_be64(0xffffffffff000000UL))) == 0UL; |