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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:48 +0000 (07:21 +0200)
commit0ab012e3df48e163f644f88e0d1110b9c21286d5
tree7235f5e16fee57375920791e6329ca775d4124e5
parent2170bbf19f6ef6b2740f186ee107827f31395218
net: stmmac: don't overwrite discard_frame status

[ Upstream commit 1b746ce8b397e58f9e40ce5c63b7198de6930482 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/enh_desc.c