Commit Graph

16 Commits (master)

Author SHA1 Message Date
Oliver Hartkopp 99c5c14790 can.h: canxl: support Remote Request Substitution bit access
The Remote Request Substitution bit is a dominant bit ("0") in the CAN XL
frame. As some CAN XL controllers support to access this bit a new
CANXL_RRS value has been defined for the canxl_frame.flags element.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2025-01-24 14:22:21 +01:00
Oliver Hartkopp 8ba360ea31 include: update includes to Linux v6.9 upstream
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2024-02-14 20:18:29 +01:00
Oliver Hartkopp cfe41963f3 include: update includes to latest Linux v6.2 upstream
Update includes to support CAN XL and latest CAN netlink features.

Upstream commits:

(1a3e3034c049) "can: canxl: introduce CAN XL data structure"
(061834624c87) "can: set CANFD_FDF flag in all CAN FD frame structures"
(94dfc73e7cf4) "treewide: uapi: Replace zero-length arrays with flexible-array members"
(383f0993fc77) "can: netlink: report the CAN controller mode supported flags"
(d99755f71a80) "can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC)"
(63dfe0709643) "can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min"
(626332696d75) "can: raw: add CAN XL support"

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2023-02-25 14:55:00 +01:00
Oliver Hartkopp affdc1b799 can: uapi: update can.h to latest upstream version
This update includes:

commit f5076c6ba02e ("can: uapi: can.h: mark union inside struct can_frame packed")
commit 7e97d274db92 ("can: uapi: update CAN-FD frame description")
commit 025468842212 ("can: uapi: introduce CANFD_FDF flag for mixed content in struct canfd_frame")

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-06-01 19:55:40 +02:00
Oliver Hartkopp c398e56afb can: add optional DLC element to Classical CAN frame structure
ISO 11898-1 Chapter 8.4.2.3 defines a 4 bit data length code (DLC) table which
maps the DLC to the payload length of the CAN frame in bytes:

    DLC      ->  payload length
    0 .. 8   ->  0 .. 8
    9 .. 15  ->  8

Although the DLC values 8 .. 15 in Classical CAN always result in a payload
length of 8 bytes these DLC values are transparently transmitted on the CAN
bus. As the struct can_frame only provides a 'len' element (formerly 'can_dlc')
which contains the plain payload length ( 0 .. 8 ) of the CAN frame, the raw
DLC is not visible to the application programmer, e.g. for testing use-cases.

To access the raw DLC values 9 .. 15 the len8_dlc element is introduced, which
is only valid when the payload length 'len' is 8 and the DLC is greater than 8.

The len8_dlc element is filled by the CAN interface driver and used for CAN
frame creation by the CAN driver when the CAN_CTRLMODE_CC_LEN8_DLC flag is
supported by the driver and enabled via netlink configuration interface.

Reported-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2020-11-22 18:41:38 +01:00
Yegor Yefremov ffd60c9b74 include: import header files from kernel v5.4-rc7
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-12 08:59:58 +01:00
Marc Kleine-Budde 06d3beb08c include: import header files from linux-5.0 (including new j1939 patches)
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-04-04 10:19:11 +02:00
Marc Kleine-Budde c5fd57df34 include: import header files from kernel 2018-02-11 14:39:01 +01:00
Kurt Van Dijck 19ee95491a can-j1939: update headers with j1939
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Marc Kleine-Budde 9a967265bc include: import header files from kernel v4.15-rc5
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-17 15:51:31 +01:00
Marc Kleine-Budde a51381e548 include: import copyright information from the kernel
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 14:22:43 +01:00
Marc Kleine-Budde 9db35b68ef include: can.h: add typedef for __kernel_sa_family_t to make headers self-contained
This patch adds the typedef for __kernel_sa_family_t that was introduced in
Linux v3.1-rc2 (commit 6602a4b net: Make userland include of netlink.h more sane)
in <linux/socket.h>. It must be duplicated here to make the CAN headers
self-contained.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:57:29 +01:00
Marc Kleine-Budde fb5f0cca7d include: can.h: remove unused include of version.h
This patch remove the include of version.h, as it's not used and also not
present in the kernel headers.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:57:12 +01:00
Marc Kleine-Budde 08d2c63e00 include: fix paths mentioned in files
This patch fixes paths mentioned in the files which are wrong now, due the move
of the files in the previous patch.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:48:09 +01:00
Uwe Kleine-König ed7bc7d366 include: Move all includes from include/socketcan to include/linux
This makes it possible to import header from the kernel more easily, e.g.:

	cd $path_to_linux_repo
	make headers_install
	rsync -a --exclude .\* usr/include/linux/can* $path_to_can_utils/include/linux

[mkl: also move isotp.h although Uwe skipped it as it is not
      part of the upstream kernel; adapt commit log accordingly]

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:48:09 +01:00
Marc Kleine-Budde 77de10356f include: import kernel header files into tree
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Jan-Niklas Meier <dschanoeh@googlemail.com>
2012-01-11 12:14:15 +01:00