linux-uconsole/include/uapi/linux/can
Vincent Mailhol 4c036be757 can: error: specify the values of data[5..7] of CAN error frames
[ Upstream commit e70a3263a7 ]

Currently, data[5..7] of struct can_frame, when used as a CAN error
frame, are defined as being "controller specific". Device specific
behaviours are problematic because it prevents someone from writing
code which is portable between devices.

As a matter of fact, data[5] is never used, data[6] is always used to
report TX error counter and data[7] is always used to report RX error
counter. can-utils also relies on this.

This patch updates the comment in the uapi header to specify that
data[5] is reserved (and thus should not be used) and that data[6..7]
are used for error counters.

Fixes: 0d66548a10 ("[CAN]: Add PF_CAN core module")
Link: https://lore.kernel.org/all/20220719143550.3681-11-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-21 15:15:49 +02:00
..
bcm.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00
error.h can: error: specify the values of data[5..7] of CAN error frames 2022-08-21 15:15:49 +02:00
gw.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00
isotp.h can: isotp: set default value for N_As to 50 micro seconds 2022-04-13 21:01:00 +02:00
j1939.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00
netlink.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00
raw.h can: raw: add missing error queue support 2020-10-06 22:44:27 +02:00
vxcan.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00