Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
*/
static void sllin_report_error(struct sllin *sl, int err)
{
+ unsigned char *lin_buff;
+ int lin_id;
+
switch (err) {
case LIN_ERR_CHECKSUM:
sl->dev->stats.rx_crc_errors++;
break;
}
- sllin_send_canfr(sl, 0 | CAN_EFF_FLAG |
+ lin_buff = (sl->lin_master) ? sl->tx_buff : sl->rx_buff;
+ lin_id = lin_buff[SLLIN_BUFF_ID] & LIN_ID_MASK;
+ sllin_send_canfr(sl, lin_id | CAN_EFF_FLAG |
(err & ~LIN_ID_MASK), NULL, 0);
}