Skip to content
Commit 3bc41d6d authored by Sven Van Asbroeck's avatar Sven Van Asbroeck Committed by Jakub Kicinski
Browse files

lan743x: fix ethernet frame cutoff issue



The ethernet frame length is calculated incorrectly. Depending on
the value of RX_HEAD_PADDING, this may result in ethernet frames
that are too short (cut off at the end), or too long (garbage added
to the end).

Fix by calculating the ethernet frame length correctly. For added
clarity, use the ETH_FCS_LEN constant in the calculation.

Many thanks to Heiner Kallweit for suggesting this solution.

Suggested-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Fixes: 3e21a10f

 ("lan743x: trim all 4 bytes of the FCS; not just 2")
Link: https://lore.kernel.org/lkml/20210408172353.21143-1-TheSven73@gmail.com/
Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
Reviewed-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
Tested-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
Link: https://lore.kernel.org/r/20210409003904.8957-1-TheSven73@gmail.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 864db232
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