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>
This commit is contained in:
Olivier Sobrie 2013-01-18 09:32:40 +01:00 committed by Marc Kleine-Budde
parent 6ea4588686
commit 71088c4bd9
1 changed files with 2 additions and 2 deletions

View File

@ -746,12 +746,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
} }
if (err_status & HECC_CANES_CRCE) { if (err_status & HECC_CANES_CRCE) {
hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE); hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE);
cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ |
CAN_ERR_PROT_LOC_CRC_DEL; CAN_ERR_PROT_LOC_CRC_DEL;
} }
if (err_status & HECC_CANES_ACKE) { if (err_status & HECC_CANES_ACKE) {
hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE); hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE);
cf->data[2] |= CAN_ERR_PROT_LOC_ACK | cf->data[3] |= CAN_ERR_PROT_LOC_ACK |
CAN_ERR_PROT_LOC_ACK_DEL; CAN_ERR_PROT_LOC_ACK_DEL;
} }
} }