mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
can: pch_can: fix invalid error codes
commit ee50e135ae upstream.
Errors in CAN protocol (location) are reported in data[3] of the can
frame instead of data[2].
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
831362319d
commit
bb40f9f8a4
@@ -559,7 +559,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
|
||||
stats->rx_errors++;
|
||||
break;
|
||||
case PCH_CRC_ERR:
|
||||
cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ |
|
||||
cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ |
|
||||
CAN_ERR_PROT_LOC_CRC_DEL;
|
||||
priv->can.can_stats.bus_error++;
|
||||
stats->rx_errors++;
|
||||
|
||||
Reference in New Issue
Block a user