net: stmmac: don't overwrite discard_frame status
commit2207295c459d564a5078156d0861ca8014f2978e
authorAaro Koskinen <aaro.koskinen@nokia.com>
Wed, 27 Mar 2019 20:35:38 +0000 (27 22:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:19:09 +0000 (8 07:19 +0200)
tree52d4a6ff5705662af1e86660ddb0ee772a86e6a3
parent2e89db5da9d559c8b822f1d70c180428917c4a9d
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