net: rmnet_data: fix UL checksum header format

MAPv3 UL checksum header requires that the CHECKSUM_INSERT_OFFSET
will be relative to CHECKSUM_START_OFFSET.

CRs-fixed: 806129
Change-Id: I1f8363e90588dfbd3ac4f9f35defd6259406d8b5
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
This commit is contained in:
Sivan Reinstein 2015-03-11 10:31:31 +02:00 committed by Gerrit - the friendly Code Review server
parent f202efac91
commit 4469287779
1 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -621,8 +621,7 @@ static void rmnet_map_fill_ipv4_packet_ul_checksum_header(void *iphdr,
ul_header->checksum_start_offset = htons((unsigned short)
(skb_transport_header(skb) - (unsigned char *)iphdr));
ul_header->checksum_insert_offset = skb->csum_offset + (unsigned short)
(skb_transport_header(skb) - (unsigned char *)iphdr);
ul_header->checksum_insert_offset = skb->csum_offset;
ul_header->cks_en = 1;
if (ip4h->protocol == IPPROTO_UDP)
ul_header->udp_ip4_ind = 1;
@ -641,8 +640,7 @@ static void rmnet_map_fill_ipv6_packet_ul_checksum_header(void *iphdr,
ul_header->checksum_start_offset = htons((unsigned short)
(skb_transport_header(skb) - (unsigned char *)iphdr));
ul_header->checksum_insert_offset = skb->csum_offset + (unsigned short)
(skb_transport_header(skb) - (unsigned char *)iphdr);
ul_header->checksum_insert_offset = skb->csum_offset;
ul_header->cks_en = 1;
ul_header->udp_ip4_ind = 0;
/* Changing checksum_insert_offset to network order */