This patch adds the function can_skb_get_frame_len() which returns the length
of a CAN frame on the data link layer, including Start-of-frame, Identifier,
various other bits, the actual data, the CRC, the End-of-frame, the Inter frame
spacing.
Co-developed-by: Arunachalam Santhanam <[email protected]>
Signed-off-by: Arunachalam Santhanam <[email protected]>
Co-developed-by: Vincent Mailhol <[email protected]>
Signed-off-by: Vincent Mailhol <[email protected]>
Acked-by: Vincent Mailhol <[email protected]>
Reviewed-by: Vincent Mailhol <[email protected]>
Co-developed-by: Marc Kleine-Budde <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
The data field in CAN-FD frames have specifig frame length (0, 1, 2, 3, 4, 5,
6, 7, 8, 12, 16, 20, 24, 32, 48, 64). This function "rounds" up a given length
to the next valid CAN-FD frame length.
Reviewed-by: Vincent Mailhol <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>