7 * Frame length calculation modes.
9 * CFL_WORSTCASE corresponds to Ken Tindells *worst* case calculation
10 * for stuff-bits (see "Guaranteeing Message Latencies on Controller
11 * Area Network" 1st ICC'94) the needed bits on the wire can be
14 * (34 + 8n)/5 + 47 + 8n for SFF frames (11 bit CAN-ID) => (269 + 48n)/5
15 * (54 + 8n)/5 + 67 + 8n for EFF frames (29 bit CAN-ID) => (389 + 48n)/5
17 * while 'n' is the data length code (number of payload bytes)
21 CFL_NO_BITSTUFFING, /* plain bit calculation without bitstuffing */
22 CFL_WORSTCASE, /* with bitstuffing following Tindells estimation */
23 CFL_EXACT, /* exact calculation of stuffed bits based on frame
28 * Calculates the number of bits a frame needs on the wire (including
31 * Mode determines how to deal with stuffed bits.
33 unsigned can_frame_length(struct canfd_frame *frame, enum cfl_mode mode, int mtu);