Skip to content

Commit

Permalink
can: gw: use struct canfd_frame as internal data structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Hartkopp authored and Marc Kleine-Budde committed Aug 13, 2019
1 parent 21468e6 commit e9dc7c6
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 107 deletions.
5 changes: 3 additions & 2 deletions include/uapi/linux/can/gw.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ enum {

/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
#define CGW_MOD_ID 0x01
#define CGW_MOD_DLC 0x02
#define CGW_MOD_DLC 0x02 /* contains the data length in bytes */
#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD length representation */
#define CGW_MOD_DATA 0x04

#define CGW_FRAME_MODS 3 /* ID DLC DATA */
#define CGW_FRAME_MODS 3 /* ID DLC/LEN DATA */

#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)

Expand Down
Loading

0 comments on commit e9dc7c6

Please sign in to comment.