summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2019-09-20 19:18:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-05 13:47:42 +0300
commit18630dae061c05af8220bd4b64e8214b60a06f58 (patch)
tree83af2801c5ed2729097425faec40690d64b0de4c /drivers/net/ethernet
parentb443d4bb439dc1fe40f3fb4cd65a01eb905a7557 (diff)
downloadlinux-18630dae061c05af8220bd4b64e8214b60a06f58.tar.xz
skge: fix checksum byte order
[ Upstream commit 5aafeb74b5bb65b34cc87c7623f9fa163a34fa3b ] Running old skge driver on PowerPC causes checksum errors because hardware reported 1's complement checksum is in little-endian byte order. Reported-by: Benoit <benoit.sansoni@gmail.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/marvell/skge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 5d00be3aac73..191f20a074a9 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -3122,7 +3122,7 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
skb_put(skb, len);
if (dev->features & NETIF_F_RXCSUM) {
- skb->csum = csum;
+ skb->csum = le16_to_cpu(csum);
skb->ip_summed = CHECKSUM_COMPLETE;
}