]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.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)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 26 Jan 2013 16:13:41 +0000 (17:13 +0100)
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>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/pch_can.c

index 7d1748575b1fffc45f38351ea3f071269545548a..5c314a961970b0041c7776da283979f00c4114f8 100644 (file)
@@ -560,7 +560,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++;