From 3eeb29972b1139f733f7269def527900729f4cc7 Mon Sep 17 00:00:00 2001 From: Giuseppe CAVALLARO Date: Tue, 27 Jul 2010 00:09:47 +0000 Subject: stmmac: fix automatic PAD/FCS stripping For Simple Ethernet frames (802.2 and 802.3) the GMAC Core never strips pad and fcs. This means the ACS has no effect on IPv4/6 frames. The FL bits, in the RDES0, include the FCS so the driver has to remove it in SW. For 802.3 frame format with LLC or LLC-SNAP, when set the ACS bit, the HW strips both PAD and FCS. The FL bits, in the RDES0, actually represents the frame length already stripped. This patch fixes this logic within the device driver that erroneously removed 4byte from 802.3 frames already stripped corrupting the payload. Signed-off-by: Giuseppe Cavallaro Signed-off-by: David S. Miller --- drivers/net/stmmac/common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/stmmac/common.h') diff --git a/drivers/net/stmmac/common.h b/drivers/net/stmmac/common.h index 144f76fd3e39..66b9da0260fe 100644 --- a/drivers/net/stmmac/common.h +++ b/drivers/net/stmmac/common.h @@ -108,6 +108,7 @@ enum rx_frame_status { /* IPC status */ good_frame = 0, discard_frame = 1, csum_none = 2, + llc_snap = 4, }; enum tx_dma_irq_status { -- cgit v1.2.1