diff options
Diffstat (limited to 'include/net/checksum.h')
-rw-r--r-- | include/net/checksum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h index a28f4e0f6251..87cb1903640d 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h | |||
@@ -57,12 +57,14 @@ static __inline__ __wsum csum_and_copy_to_user | |||
57 | } | 57 | } |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifndef HAVE_ARCH_CSUM_ADD | ||
60 | static inline __wsum csum_add(__wsum csum, __wsum addend) | 61 | static inline __wsum csum_add(__wsum csum, __wsum addend) |
61 | { | 62 | { |
62 | u32 res = (__force u32)csum; | 63 | u32 res = (__force u32)csum; |
63 | res += (__force u32)addend; | 64 | res += (__force u32)addend; |
64 | return (__force __wsum)(res + (res < (__force u32)addend)); | 65 | return (__force __wsum)(res + (res < (__force u32)addend)); |
65 | } | 66 | } |
67 | #endif | ||
66 | 68 | ||
67 | static inline __wsum csum_sub(__wsum csum, __wsum addend) | 69 | static inline __wsum csum_sub(__wsum csum, __wsum addend) |
68 | { | 70 | { |