mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short
This patch updates csum_ipv6_magic so that it correctly recognizes that protocol is a unsigned 8 bit value. This will allow us to better understand what limitations may or may not be present in how we handle the data. For example there are a number of places that call htonl on the protocol value. This is likely not necessary and can be replaced with a multiplication by ntohl(1) which will be converted to a shift by the compiler. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
01cfbad79a
commit
1e94082963
18 changed files with 21 additions and 29 deletions
|
|
@ -122,7 +122,7 @@ static inline __sum16 ip_compute_csum(const void *buf, int len)
|
|||
#define _HAVE_ARCH_IPV6_CSUM
|
||||
static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
|
||||
const struct in6_addr *daddr,
|
||||
__u32 len, unsigned short proto,
|
||||
__u32 len, __u8 proto,
|
||||
__wsum sum)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
|
|
|
|||
Loading…
Reference in a new issue