ipv4: Update parameters for csum_tcpudp_magic to their original types
[cascardo/linux.git] / arch / score / include / asm / checksum.h
index 961bd64..a375bc2 100644 (file)
@@ -127,10 +127,10 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
 }
 
 static inline __wsum
-csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
-               unsigned short proto, __wsum sum)
+csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len,
+                  __u8 proto, __wsum sum)
 {
-       unsigned long tmp = (ntohs(len) << 16) + proto * 256;
+       unsigned long tmp = (len + proto) << 8;
        __asm__ __volatile__(
                ".set volatile\n\t"
                "add\t%0, %0, %2\n\t"
@@ -161,8 +161,8 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
  * returns a 16-bit checksum, already complemented
  */
 static inline __sum16
-csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
-               unsigned short proto, __wsum sum)
+csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len,
+                 __u8 proto, __wsum sum)
 {
        return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
 }