net: designware: fix TX descriptor length corruption
dwc_ether_send() sets the SIZE1 field of the TX descriptor incorrectly.
It sets the SIZE1 field to a bit-wise OR of the old value and the new
value.  If the old value differs from the new value, the transmitted
Ethernet frame will be longer than it should be and is likely to have an
incorrect frame check sequence.  As more and more Ethernet frames of
different lengths are sent, more and more of the TX descriptors are
affected (up to a maximum number of CONFIG_TX_DESCR_NUM, defined as 16
in "designware.h").  Fix it by setting the SIZE1 field of the TX
descriptor to just the new value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent cf3b097 commit e1483104aa781cee58130d1f803315ae365a2ffe
@Ian Abbott Ian Abbott authored on 31 Jan 2019
Sascha Hauer committed on 1 Feb 2019
Showing 1 changed file
View
drivers/net/designware.c