diff options
Diffstat (limited to 'target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch index 3a9ca14204..d077b60bc8 100644 --- a/target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-3.18/902-unaligned_access_hacks.patch @@ -210,7 +210,7 @@ #include <linux/uaccess.h> #include <linux/ipv6.h> #include <linux/icmpv6.h> -@@ -833,10 +834,10 @@ static void tcp_v6_send_response(struct +@@ -837,10 +838,10 @@ static void tcp_v6_send_response(struct topt = (__be32 *)(t1 + 1); if (tsecr) { @@ -237,7 +237,7 @@ */ --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c -@@ -384,7 +384,7 @@ int ipv6_recv_error(struct sock *sk, str +@@ -386,7 +386,7 @@ int ipv6_recv_error(struct sock *sk, str ipv6_iface_scope_id(&sin->sin6_addr, IP6CB(skb)->iif); } else { @@ -246,7 +246,7 @@ &sin->sin6_addr); sin->sin6_scope_id = 0; } -@@ -718,12 +718,12 @@ int ip6_datagram_send_ctl(struct net *ne +@@ -720,12 +720,12 @@ int ip6_datagram_send_ctl(struct net *ne } if (fl6->flowlabel&IPV6_FLOWINFO_MASK) { @@ -342,7 +342,7 @@ #endif /* _LINUX_TYPES_H */ --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c -@@ -1326,8 +1326,8 @@ static struct sk_buff **inet_gro_receive +@@ -1329,8 +1329,8 @@ static struct sk_buff **inet_gro_receive if (unlikely(ip_fast_csum((u8 *)iph, 5))) goto out_unlock; @@ -637,14 +637,19 @@ #include <linux/netdevice.h> --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h -@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct - { +@@ -124,9 +124,9 @@ static inline int IP6_ECN_set_ce(struct if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) return 0; -- *(__be32*)iph |= htonl(INET_ECN_CE << 20); -+ net_hdr_word(iph) |= htonl(INET_ECN_CE << 20); + +- from = *(__be32 *)iph; ++ from = net_hdr_word(iph); + to = from | htonl(INET_ECN_CE << 20); +- *(__be32 *)iph = to; ++ net_hdr_word(iph) = to; + if (skb->ip_summed == CHECKSUM_COMPLETE) + skb->csum = csum_add(csum_sub(skb->csum, from), to); return 1; - } +@@ -134,7 +134,7 @@ static inline int IP6_ECN_set_ce(struct static inline void IP6_ECN_clear(struct ipv6hdr *iph) { @@ -664,7 +669,7 @@ #define IP6_MF 0x0001 #define IP6_OFFSET 0xFFF8 -@@ -398,8 +398,8 @@ static inline void __ipv6_addr_set_half( +@@ -417,8 +417,8 @@ static inline void __ipv6_addr_set_half( } #endif #endif @@ -675,7 +680,7 @@ } static inline void ipv6_addr_set(struct in6_addr *addr, -@@ -458,6 +458,8 @@ static inline bool ipv6_prefix_equal(con +@@ -477,6 +477,8 @@ static inline bool ipv6_prefix_equal(con const __be32 *a1 = addr1->s6_addr32; const __be32 *a2 = addr2->s6_addr32; unsigned int pdw, pbi; @@ -684,7 +689,7 @@ /* check complete u32 in prefix */ pdw = prefixlen >> 5; -@@ -466,7 +468,9 @@ static inline bool ipv6_prefix_equal(con +@@ -485,7 +487,9 @@ static inline bool ipv6_prefix_equal(con /* check incomplete u32 in prefix */ pbi = prefixlen & 0x1f; @@ -695,7 +700,7 @@ return false; return true; -@@ -609,13 +613,13 @@ static inline void ipv6_addr_set_v4mappe +@@ -629,13 +633,13 @@ static inline void ipv6_addr_set_v4mappe */ static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen) { @@ -711,7 +716,7 @@ if (xb) return i * 32 + 31 - __fls(ntohl(xb)); } -@@ -739,17 +743,18 @@ static inline __be32 ip6_make_flowlabel( +@@ -759,17 +763,18 @@ static inline __be32 ip6_make_flowlabel( static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, __be32 flowlabel) { |