]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
can: pch_can: fix invalid error codes
authorOlivier Sobrie <olivier@sobrie.be>
Fri, 18 Jan 2013 08:32:41 +0000 (09:32 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:48 +0000 (04:33 +0000)
commit ee50e135aeb048b90fab662e661c58b67341830b 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: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/pch_can.c

index d11fbb2b95ffe3d5e76378924c5b907f774327cf..b508a6380f8b742c866290b211b5edd3250ce76e 100644 (file)
@@ -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++;