From 33dcb1c01c20edbe6d6c77c03da49a7388ac3341 Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 17 Dec 2012 22:28:09 +0000 Subject: ar71xx: nuke 3.3 support Signed-off-by: Gabor Juhos git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34743 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-3.3/902-unaligned_access_hacks.patch | 117 --------------------- 1 file changed, 117 deletions(-) delete mode 100644 target/linux/ar71xx/patches-3.3/902-unaligned_access_hacks.patch (limited to 'target/linux/ar71xx/patches-3.3/902-unaligned_access_hacks.patch') diff --git a/target/linux/ar71xx/patches-3.3/902-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-3.3/902-unaligned_access_hacks.patch deleted file mode 100644 index 921cf194d..000000000 --- a/target/linux/ar71xx/patches-3.3/902-unaligned_access_hacks.patch +++ /dev/null @@ -1,117 +0,0 @@ ---- a/arch/mips/include/asm/checksum.h -+++ b/arch/mips/include/asm/checksum.h -@@ -12,6 +12,7 @@ - #define _ASM_CHECKSUM_H - - #include -+#include - - #include - -@@ -104,26 +105,30 @@ static inline __sum16 ip_fast_csum(const - const unsigned int *stop = word + ihl; - unsigned int csum; - int carry; -+ unsigned int w; - -- csum = word[0]; -- csum += word[1]; -- carry = (csum < word[1]); -+ csum = __get_unaligned_cpu32(word++); -+ -+ w = __get_unaligned_cpu32(word++); -+ csum += w; -+ carry = (csum < w); - csum += carry; - -- csum += word[2]; -- carry = (csum < word[2]); -+ w = __get_unaligned_cpu32(word++); -+ csum += w; -+ carry = (csum < w); - csum += carry; - -- csum += word[3]; -- carry = (csum < word[3]); -+ w = __get_unaligned_cpu32(word++); -+ csum += w; -+ carry = (csum < w); - csum += carry; - -- word += 4; - do { -- csum += *word; -- carry = (csum < *word); -+ w = __get_unaligned_cpu32(word++); -+ csum += w; -+ carry = (csum < w); - csum += carry; -- word++; - } while (word != stop); - - return csum_fold(csum); ---- a/include/linux/ip.h -+++ b/include/linux/ip.h -@@ -102,7 +102,7 @@ struct iphdr { - __be32 saddr; - __be32 daddr; - /*The options start here. */ --}; -+} __packed; - - #ifdef __KERNEL__ - #include ---- a/include/linux/ipv6.h -+++ b/include/linux/ipv6.h -@@ -126,7 +126,7 @@ struct ipv6hdr { - - struct in6_addr saddr; - struct in6_addr daddr; --}; -+} __packed; - - #ifdef __KERNEL__ - /* ---- a/include/linux/tcp.h -+++ b/include/linux/tcp.h -@@ -54,7 +54,7 @@ struct tcphdr { - __be16 window; - __sum16 check; - __be16 urg_ptr; --}; -+} __packed; - - /* - * The union cast uses a gcc extension to avoid aliasing problems ---- a/include/linux/udp.h -+++ b/include/linux/udp.h -@@ -24,7 +24,7 @@ struct udphdr { - __be16 dest; - __be16 len; - __sum16 check; --}; -+} __packed; - - /* UDP socket options */ - #define UDP_CORK 1 /* Never send partially complete segments */ ---- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c -+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -44,8 +45,8 @@ static bool ipv4_pkt_to_tuple(const stru - if (ap == NULL) - return false; - -- tuple->src.u3.ip = ap[0]; -- tuple->dst.u3.ip = ap[1]; -+ tuple->src.u3.ip = __get_unaligned_cpu32(ap++); -+ tuple->dst.u3.ip = __get_unaligned_cpu32(ap); - - return true; - } -- cgit v1.2.3