net: stmmac: don't overwrite discard_frame status
authorAaro Koskinen <aaro.koskinen@nokia.com>
Wed, 27 Mar 2019 20:35:38 +0000 (22:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Mar 2019 21:00:59 +0000 (14:00 -0700)
commit1b746ce8b397e58f9e40ce5c63b7198de6930482
tree01263c6fda926c4b0c17406f496d2a115c907757
parent07b3975352374c3f5ebb4a42ef0b253fe370542d
net: stmmac: don't overwrite discard_frame status

If we have error bits set, the discard_frame status will get overwritten
by checksum bit checks, which might set the status back to good one.
Fix by checking the COE status only if the frame is good.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/enh_desc.c