Skip to content

Commit e9dc7c6

Browse files
hartkoppmarckleinebudde
authored andcommitted
can: gw: use struct canfd_frame as internal data structure
To prepare the CAN FD support this patch implements the first adaptions in data structures for CAN FD without changing the current functionality. Additionally some code at the end of this patch is moved or indented to simplify the review of the next implementation step. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 21468e6 commit e9dc7c6

2 files changed

Lines changed: 120 additions & 107 deletions

File tree

‎include/uapi/linux/can/gw.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ enum {
9393

9494
/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
9595
#define CGW_MOD_ID 0x01
96-
#define CGW_MOD_DLC 0x02
96+
#define CGW_MOD_DLC 0x02 /* contains the data length in bytes */
97+
#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD length representation */
9798
#define CGW_MOD_DATA 0x04
9899

99-
#define CGW_FRAME_MODS 3 /* ID DLC DATA */
100+
#define CGW_FRAME_MODS 3 /* ID DLC/LEN DATA */
100101

101102
#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
102103

0 commit comments

Comments
 (0)