Skip to content

Commit cef1e11

Browse files
committed
sync linux headers with 6.16
most changes where around CANXL, which we currently don't support.
1 parent 21b1fae commit cef1e11

4 files changed

Lines changed: 30 additions & 5 deletions

File tree

core/src/include/linux/can.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct canfd_frame {
182182
/*
183183
* defined bits for canxl_frame.flags
184184
*
185-
* The canxl_frame.flags element contains two bits CANXL_XLF and CANXL_SEC
185+
* The canxl_frame.flags element contains three bits CANXL_[XLF|SEC|RRS]
186186
* and shares the relative position of the struct can[fd]_frame.len element.
187187
* The CANXL_XLF bit ALWAYS needs to be set to indicate a valid CAN XL frame.
188188
* As a side effect setting this bit intentionally breaks the length checks
@@ -192,10 +192,16 @@ struct canfd_frame {
192192
*/
193193
#define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */
194194
#define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */
195+
#define CANXL_RRS 0x02 /* Remote Request Substitution */
196+
197+
/* the 8-bit VCID is optionally placed in the canxl_frame.prio element */
198+
#define CANXL_VCID_OFFSET 16 /* bit offset of VCID in prio element */
199+
#define CANXL_VCID_VAL_MASK 0xFFUL /* VCID is an 8-bit value */
200+
#define CANXL_VCID_MASK (CANXL_VCID_VAL_MASK << CANXL_VCID_OFFSET)
195201

196202
/**
197203
* struct canxl_frame - CAN with e'X'tended frame 'L'ength frame structure
198-
* @prio: 11 bit arbitration priority with zero'ed CAN_*_FLAG flags
204+
* @prio: 11 bit arbitration priority with zero'ed CAN_*_FLAG flags / VCID
199205
* @flags: additional flags for CAN XL
200206
* @sdt: SDU (service data unit) type
201207
* @len: frame payload length in byte (CANXL_MIN_DLEN .. CANXL_MAX_DLEN)
@@ -205,7 +211,7 @@ struct canfd_frame {
205211
* @prio shares the same position as @can_id from struct can[fd]_frame.
206212
*/
207213
struct canxl_frame {
208-
canid_t prio; /* 11 bit priority for arbitration (canid_t) */
214+
canid_t prio; /* 11 bit priority for arbitration / 8 bit VCID */
209215
__u8 flags; /* additional flags for CAN XL */
210216
__u8 sdt; /* SDU (service data unit) type */
211217
__u16 len; /* frame payload length in byte */

core/src/include/linux/can/isotp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* linux/can/isotp.h
44
*
5-
* Definitions for isotp CAN sockets (ISO 15765-2:2016)
5+
* Definitions for ISO 15765-2 CAN transport protocol sockets
66
*
77
* Copyright (c) 2020 Volkswagen Group Electronic Research
88
* All rights reserved.
@@ -137,6 +137,7 @@ struct can_isotp_ll_options {
137137
#define CAN_ISOTP_WAIT_TX_DONE 0x0400 /* wait for tx completion */
138138
#define CAN_ISOTP_SF_BROADCAST 0x0800 /* 1-to-N functional addressing */
139139
#define CAN_ISOTP_CF_BROADCAST 0x1000 /* 1-to-N transmission w/o FC */
140+
#define CAN_ISOTP_DYN_FC_PARMS 0x2000 /* dynamic FC parameters BS/STmin */
140141

141142
/* protocol machine default values */
142143

core/src/include/linux/can/raw.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ enum {
6565
CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */
6666
CAN_RAW_JOIN_FILTERS, /* all filters must match to trigger */
6767
CAN_RAW_XL_FRAMES, /* allow CAN XL frames (default:off) */
68+
CAN_RAW_XL_VCID_OPTS, /* CAN XL VCID configuration options */
6869
};
6970

71+
/* configuration for CAN XL virtual CAN identifier (VCID) handling */
72+
struct can_raw_vcid_options {
73+
74+
__u8 flags; /* flags for vcid (filter) behaviour */
75+
__u8 tx_vcid; /* VCID value set into canxl_frame.prio */
76+
__u8 rx_vcid; /* VCID value for VCID filter */
77+
__u8 rx_vcid_mask; /* VCID mask for VCID filter */
78+
79+
};
80+
81+
/* can_raw_vcid_options.flags for CAN XL virtual CAN identifier handling */
82+
#define CAN_RAW_XL_VCID_TX_SET 0x01
83+
#define CAN_RAW_XL_VCID_TX_PASS 0x02
84+
#define CAN_RAW_XL_VCID_RX_FILTER 0x04
85+
7086
#endif /* !_UAPI_CAN_RAW_H */

core/src/main/java/tel/schich/javacan/IsotpOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ public enum Flag {
269269
RX_EXT_ADDR(0x0200, "different rx extended addressing"),
270270
WAIT_TX_DONE(0x0400, "wait for tx completion"),
271271
SF_BROADCAST(0x0800, "1-to-N functional addressing"),
272-
CF_BROADCAST(0x1000, "1-to-N transmission w/o FC");
272+
CF_BROADCAST(0x1000, "1-to-N transmission w/o FC"),
273+
DYN_FC_PARMS(0x2000, "dynamic FC parameters BS/STmin"),
274+
;
273275

274276
private final int bit;
275277
private final String description;

0 commit comments

Comments
 (0)