net: qualcomm: rmnet: Fix incorrect UL checksum offload logic
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Thu, 25 Jul 2019 18:07:12 +0000 (12:07 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Aug 2019 15:52:32 +0000 (17:52 +0200)
commit44b96a38c2b5dd6e67039898201fdbcbaa4974ae
treeb8124ea1e379a8d8931559de4652544e50c728e2
parentc8b05980c4bf7abfe9a016c34f8bf3bb5396cbfb
net: qualcomm: rmnet: Fix incorrect UL checksum offload logic

[ Upstream commit a7cf3d24ee6081930feb4c830a7f6f16ebe31c49 ]

The udp_ip4_ind bit is set only for IPv4 UDP non-fragmented packets
so that the hardware can flip the checksum to 0xFFFF if the computed
checksum is 0 per RFC768.

However, this bit had to be set for IPv6 UDP non fragmented packets
as well per hardware requirements. Otherwise, IPv6 UDP packets
with computed checksum as 0 were transmitted by hardware and were
dropped in the network.

In addition to setting this bit for IPv6 UDP, the field is also
appropriately renamed to udp_ind as part of this change.

Fixes: 5eb5f8608ef1 ("net: qualcomm: rmnet: Add support for TX checksum offload")
Cc: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c