Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ad2864d8 authored by Sonic Zhang's avatar Sonic Zhang Committed by David S. Miller
Browse files

netdev: bfin_mac: deduce Ethernet FCS from hardware IP payload checksum



IP checksum is based on 16-bit one's complement algorithm, so to deduce a
value from checksum is equal to add its complement.

Unfortunately, the Blackfin on-chip MAC checksum logic only works when the
IP packet has a header length of 20 bytes.  This is true for most IPv4
packets, but not for IPv6 packets or IPv4 packets which use header options.
So only use the hardware checksum when appropriate.

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarJon Kowal <jon.kowal@dspecialists.de>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6e1e4f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment