Signed-off-by: Alexander Stein <[email protected]>
---
Wolfgang,

did you mean something like that?
On ACK (slot) error it sets both CAN_ERR_ACK and CAN_ERR_PROT_LOC_ACK bits.

Alexander

 drivers/net/can/at91_can.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 57d2ffb..708fa03 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -670,7 +670,8 @@ static void at91_poll_err_frame(struct net_device *dev,
        if (reg_sr & AT91_IRQ_AERR) {
                netdev_dbg(dev, "AERR irq\n");
                dev->stats.tx_errors++;
-               cf->can_id |= CAN_ERR_ACK;
+               cf->can_id |= CAN_ERR_ACK | CAN_ERR_PROT;
+               cf->data[3] |= CAN_ERR_PROT_LOC_ACK;
        }
 
        /* Form error */
-- 
1.7.3.4

_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to