mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: stmmac: Only the last buffer has the FCS field
Only the last received buffer contains the FCS field. Check for end of
packet before trying to strip the FCS field.
Fixes: 88ebe2cf7f
("net: stmmac: Rework stmmac_rx()")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eaf4fac478
commit
93b5dce401
1 changed files with 3 additions and 2 deletions
|
@ -3644,8 +3644,9 @@ read_again:
|
|||
* feature is always disabled and packets need to be
|
||||
* stripped manually.
|
||||
*/
|
||||
if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00) ||
|
||||
unlikely(status != llc_snap)) {
|
||||
if (likely(!(status & rx_not_ls)) &&
|
||||
(likely(priv->synopsys_id >= DWMAC_CORE_4_00) ||
|
||||
unlikely(status != llc_snap))) {
|
||||
if (buf2_len)
|
||||
buf2_len -= ETH_FCS_LEN;
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue