Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: ti_hecc: fix invalid error codes

Errors in CAN protocol (location) are reported in data[3] of the can
frame instead of data[2].

Cc: linux-stable <stable@vger.kernel.org>
Cc: Anant Gole <anantgole@ti.com>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Olivier Sobrie and committed by
Marc Kleine-Budde
71088c4b 6ea45886

+2 -2
+2 -2
drivers/net/can/ti_hecc.c
··· 746 746 } 747 747 if (err_status & HECC_CANES_CRCE) { 748 748 hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE); 749 - cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | 749 + cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ | 750 750 CAN_ERR_PROT_LOC_CRC_DEL; 751 751 } 752 752 if (err_status & HECC_CANES_ACKE) { 753 753 hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE); 754 - cf->data[2] |= CAN_ERR_PROT_LOC_ACK | 754 + cf->data[3] |= CAN_ERR_PROT_LOC_ACK | 755 755 CAN_ERR_PROT_LOC_ACK_DEL; 756 756 } 757 757 }