linux/include/uapi/linux/can
Vincent Mailhol 5793da4db3 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>
History 2022-08-17 14:23:33 +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-17 14:23:33 +02:00
gw.h can: gw: support modification of Classical CAN DLCs 2020-11-20 12:05:14 +01:00
isotp.h can: isotp: set default value for N_As to 50 micro seconds 2022-04-13 20:59:08 +02:00
j1939.h can: j1939: extend UAPI to notify about RX status 2021-08-04 12:11:52 +02:00
netlink.h can: add optional DLC element to Classical CAN frame structure 2020-11-20 09:43:29 +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