Home
last modified time | relevance | path

Searched hist:e5adbbdfa2fb17e3d266011cef816ee492235581 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/ethernet/qualcomm/rmnet/
H A Drmnet_map_data.cdiff e5adbbdfa2fb17e3d266011cef816ee492235581 Fri Jun 11 14:05:27 CDT 2021 Alex Elder <elder@linaro.org> net: qualcomm: rmnet: clarify a bit of code

In rmnet_map_ipv6_dl_csum_trailer() there is an especially involved
line of code that determines the ones' complement sum of the IPv6
packet header (in host byte order). Simplify that by storing the
result of computing just the header checksum in a local variable,
then using that in the original assignment.

Use the size of the IPv6 header structure as the number of bytes to
checksum, rather than computing the offset to the transport header.
And use ip_fast_csum() rather than ipa_compute_csum(), knowing that
the size of an IPv6 header (40 bytes) is a multiple of 4 bytes
greater than 16.

Add some comments to match rmnet_map_ipv4_dl_csum_trailer().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>