can: isotp: add support for transmission without flow control
Subsystems (2)
Oliver Hartkopp
maintainerPATCH 1/1 can: isotp: add support for transmission without flow control
Usually the ISO 15765-2 protocol is a point-to-point protocol to transfer segmented PDUs to a dedicated receiver. This receiver sends a flow control message to specify protocol options and timings (e.g. block size / STmin).
The so called functional addressing communication allows a 1:N communication but is limited to a single frame length.
This new CAN_ISOTP_CF_BROADCAST allows an unconfirmed 1:N communication with PDU length that would not fit into a single frame. This feature is not covered by the ISO 15765-2 standard.
Signed-off-by Oliver Hartkopp <[email protected]>
--- include/uapi/linux/can/isotp.h | 25 +++++---- net/can/isotp.c | 100 ++++++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 33 deletions(-)
include/uapi/linux/can/isotp.h +13 -12
@@ -122,22 +122,23 @@ struct can_isotp_ll_options {/* by the CAN netdriver configuration */ };/* flags for isotp behaviour */ -#define CAN_ISOTP_LISTEN_MODE 0x001/* listen only (do not send FC) */ -#define CAN_ISOTP_EXTEND_ADDR 0x002/* enable extended addressing */ -#define CAN_ISOTP_TX_PADDING 0x004/* enable CAN frame padding tx path */ -#define CAN_ISOTP_RX_PADDING 0x008/* enable CAN frame padding rx path */ -#define CAN_ISOTP_CHK_PAD_LEN 0x010/* check received CAN frame padding */ -#define CAN_ISOTP_CHK_PAD_DATA 0x020/* check received CAN frame padding */ -#define CAN_ISOTP_HALF_DUPLEX 0x040/* half duplex error state handling */ -#define CAN_ISOTP_FORCE_TXSTMIN 0x080/* ignore stmin from received FC */ -#define CAN_ISOTP_FORCE_RXSTMIN 0x100/* ignore CFs depending on rx stmin */ -#define CAN_ISOTP_RX_EXT_ADDR 0x200/* different rx extended addressing */ -#define CAN_ISOTP_WAIT_TX_DONE 0x400/* wait for tx completion */ -#define CAN_ISOTP_SF_BROADCAST 0x800/* 1-to-N functional addressing */ +#define CAN_ISOTP_LISTEN_MODE 0x0001/* listen only (do not send FC) */ +#define CAN_ISOTP_EXTEND_ADDR 0x0002/* enable extended addressing */ +#define CAN_ISOTP_TX_PADDING 0x0004/* enable CAN frame padding tx path */ +#define CAN_ISOTP_RX_PADDING 0x0008/* enable CAN frame padding rx path */ +#define CAN_ISOTP_CHK_PAD_LEN 0x0010/* check received CAN frame padding */ +#define CAN_ISOTP_CHK_PAD_DATA 0x0020/* check received CAN frame padding */ +#define CAN_ISOTP_HALF_DUPLEX 0x0040/* half duplex error state handling */ +#define CAN_ISOTP_FORCE_TXSTMIN 0x0080/* ignore stmin from received FC */ +#define CAN_ISOTP_FORCE_RXSTMIN 0x0100/* ignore CFs depending on rx stmin */ +#define CAN_ISOTP_RX_EXT_ADDR 0x0200/* different rx extended addressing */ +#define CAN_ISOTP_WAIT_TX_DONE 0x0400/* wait for tx completion */ +#define CAN_ISOTP_SF_BROADCAST 0x0800/* 1-to-N functional addressing */ +#define CAN_ISOTP_CF_BROADCAST 0x1000/* 1-to-N transmission w/o FC */ /* protocol machine default values */ #define CAN_ISOTP_DEFAULT_FLAGS 0#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
net/can/isotp.c +79 -21
231 lines not on this page · raw message
Signature · 1 line
2.30.2