Searched hist:"50 c62a111c4855510b0d8a2d8e50214172166b61" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/qualcomm/rmnet/ |
H A D | rmnet_map_data.c | diff 50c62a111c4855510b0d8a2d8e50214172166b61 Mon Mar 15 16:51:47 CDT 2021 Alex Elder <elder@linaro.org> net: qualcomm: rmnet: simplify some byte order logic
In rmnet_map_ipv4_ul_csum_header() and rmnet_map_ipv6_ul_csum_header() the offset within a packet at which checksumming should commence is calculated. This calculation involves byte swapping and a forced type conversion that makes it hard to understand.
Simplify this by computing the offset in host byte order, then converting the result when assigning it into the header field.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
|