Skip to content

Commit

Permalink
can: pch_can: fix invalid error codes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Olivier Sobrie authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent 71088c4 commit ee50e13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/pch_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit ee50e13

Please sign in to comment.