• Giuseppe CAVALLARO's avatar
    stmmac: fix automatic PAD/FCS stripping · 3eeb2997
    Giuseppe CAVALLARO authored
    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: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3eeb2997
enh_desc.c 9.41 KB