net: qualcomm: rmnet: trailer value is a checksum
authorAlex Elder <elder@linaro.org>
Sat, 12 Jun 2021 14:37:34 +0000 (09:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jun 2021 20:18:49 +0000 (13:18 -0700)
commitbe754f6435936e78dafe0ebb9d1e9d52c3bde842
treeb002f5ed264ec43b08c60e2552851497701ee86f
parent698aa6c46bf09070310cd2c8893ea2de5a796644
net: qualcomm: rmnet: trailer value is a checksum

The csum_value field in the rmnet_map_dl_csum_trailer structure is a
"real" Internet checksum.  It is a 16 bit value, in big endian format,
which represents an inverted ones' complement sum over pairs of bytes.

Make that clear by changing its type to __sum16.

This makes a typecast in rmnet_map_ipv4_dl_csum_trailer() and
another in rmnet_map_ipv6_dl_csum_trailer() unnecessary.

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
include/linux/if_rmnet.h