]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
can: ti_hecc: fix invalid error codes
authorOlivier Sobrie <olivier@sobrie.be>
Fri, 18 Jan 2013 08:32:40 +0000 (09:32 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:48 +0000 (04:33 +0000)
commit 71088c4bd9b8f8cbffb0e66f2abc14297e4b2ca8 upstream.

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

Cc: Anant Gole <anantgole@ti.com>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/ti_hecc.c

index 79c70aee308f4c305cf3a024f7b0475371b273e0..1ef9df8de979bd7b95b7d048a373ffa3050d9404 100644 (file)
@@ -735,12 +735,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
                }
                if (err_status & 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;
                }
                if (err_status & 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;
                }
        }