Commit 1f39dc50 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Khalid Elmously

skge: fix checksum byte order

BugLink: https://bugs.launchpad.net/bugs/1848589

[ Upstream commit 5aafeb74 ]

Running old skge driver on PowerPC causes checksum errors
because hardware reported 1's complement checksum is in little-endian
byte order.
Reported-by: default avatarBenoit <benoit.sansoni@gmail.com>
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent dbeb57d4
...@@ -3114,7 +3114,7 @@ static struct sk_buff *skge_rx_get(struct net_device *dev, ...@@ -3114,7 +3114,7 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
skb_put(skb, len); skb_put(skb, len);
if (dev->features & NETIF_F_RXCSUM) { if (dev->features & NETIF_F_RXCSUM) {
skb->csum = csum; skb->csum = le16_to_cpu(csum);
skb->ip_summed = CHECKSUM_COMPLETE; skb->ip_summed = CHECKSUM_COMPLETE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment