]> git.baikalelectronics.ru Git - kernel.git/commit
net: qualcomm: rmnet: simplify some byte order logic
authorAlex Elder <elder@linaro.org>
Mon, 15 Mar 2021 21:51:47 +0000 (16:51 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Mar 2021 03:41:58 +0000 (20:41 -0700)
commitbf360408fda289deb63d170db5ae5dc713fa3ae2
tree7997f86b45446fb8b9e3949205a956ea3af3946f
parent1ffcad68d300e4be97db36e5559595fd5678c48e
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>
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c