net: qualcomm: rmnet: return earlier for bad checksum
authorAlex Elder <elder@linaro.org>
Sat, 12 Jun 2021 14:37:32 +0000 (09:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jun 2021 20:18:48 +0000 (13:18 -0700)
commitfab01a6f3a61748b9c2e038c84498c6624b06236
tree39f7eaa450b74b11c6667a1a694af737247f027b
parent9d0407bc4c9ca7a2378230dd86f8ce90a2b6ad09
net: qualcomm: rmnet: return earlier for bad checksum

In rmnet_map_ipv4_dl_csum_trailer(), if the sum of the trailer
checksum and the pseudo checksum is non-zero, checksum validation
has failed.  We can return an error as soon as we know that.

We can do the same thing in rmnet_map_ipv6_dl_csum_trailer().

Add some comments that explain where we're headed.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c