aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-12-17 17:03:46 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-01-13 10:04:27 -0500
commitb4b5015a1c1450e008ccd414c760f4ef907a461b (patch)
tree41f00730a5f2b5b4bd71354ed0b6a3b24ece88a2
parentd0f0f63ac1374c13b7862b48bd7d6514913dbcad (diff)
MIPS: Use <asm-generic/checksum.h>
Right now the MIPS <asm/checksum.h> still overrides all functions. This will change in the future. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/checksum.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h
index ac0f55cc6e78..64ae32c082d1 100644
--- a/arch/mips/include/asm/checksum.h
+++ b/arch/mips/include/asm/checksum.h
@@ -99,6 +99,7 @@ __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
99 */ 99 */
100__wsum csum_partial_copy_nocheck(const void *src, void *dst, 100__wsum csum_partial_copy_nocheck(const void *src, void *dst,
101 int len, __wsum sum); 101 int len, __wsum sum);
102#define csum_partial_copy_nocheck csum_partial_copy_nocheck
102 103
103/* 104/*
104 * Fold a partial checksum without adding pseudo headers 105 * Fold a partial checksum without adding pseudo headers
@@ -114,6 +115,7 @@ static inline __sum16 csum_fold(__wsum csum)
114 115
115 return (__force __sum16)~sum; 116 return (__force __sum16)~sum;
116} 117}
118#define csum_fold csum_fold
117 119
118/* 120/*
119 * This is a version of ip_compute_csum() optimized for IP headers, 121 * This is a version of ip_compute_csum() optimized for IP headers,
@@ -152,6 +154,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
152 154
153 return csum_fold(csum); 155 return csum_fold(csum);
154} 156}
157#define ip_fast_csum ip_fast_csum
155 158
156static inline __wsum csum_tcpudp_nofold(__be32 saddr, 159static inline __wsum csum_tcpudp_nofold(__be32 saddr,
157 __be32 daddr, unsigned short len, unsigned short proto, 160 __be32 daddr, unsigned short len, unsigned short proto,
@@ -194,6 +197,7 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr,
194 197
195 return sum; 198 return sum;
196} 199}
200#define csum_tcpudp_nofold csum_tcpudp_nofold
197 201
198/* 202/*
199 * computes the checksum of the TCP/UDP pseudo-header 203 * computes the checksum of the TCP/UDP pseudo-header
@@ -206,6 +210,7 @@ static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
206{ 210{
207 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); 211 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
208} 212}
213#define csum_tcpudp_magic csum_tcpudp_magic
209 214
210/* 215/*
211 * this routine is used for miscellaneous IP-like checksums, mainly 216 * this routine is used for miscellaneous IP-like checksums, mainly
@@ -281,4 +286,6 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
281 return csum_fold(sum); 286 return csum_fold(sum);
282} 287}
283 288
289#include <asm-generic/checksum.h>
290
284#endif /* _ASM_CHECKSUM_H */ 291#endif /* _ASM_CHECKSUM_H */