diff options
author | Alex Elder <elder@linaro.org> | 2021-06-12 09:37:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-12 13:18:49 -0700 |
commit | be754f6435936e78dafe0ebb9d1e9d52c3bde842 (patch) | |
tree | b002f5ed264ec43b08c60e2552851497701ee86f /include/linux/if_rmnet.h | |
parent | 698aa6c46bf09070310cd2c8893ea2de5a796644 (diff) | |
download | lwn-be754f6435936e78dafe0ebb9d1e9d52c3bde842.tar.gz lwn-be754f6435936e78dafe0ebb9d1e9d52c3bde842.zip |
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>
Diffstat (limited to 'include/linux/if_rmnet.h')
-rw-r--r-- | include/linux/if_rmnet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h index be17610a981e..10e7521ecb6c 100644 --- a/include/linux/if_rmnet.h +++ b/include/linux/if_rmnet.h @@ -25,7 +25,7 @@ struct rmnet_map_dl_csum_trailer { u8 flags; /* MAP_CSUM_DL_VALID_FLAG */ __be16 csum_start_offset; __be16 csum_length; - __be16 csum_value; + __sum16 csum_value; } __aligned(1); /* rmnet_map_dl_csum_trailer flags field: |