Home
last modified time | relevance | path

Searched hist:"561 aa5b4" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/can/spi/mcp251xfd/
H A Dmcp251xfd-core.c561aa5b4 Mon Dec 21 14:48:20 CST 2020 Marc Kleine-Budde <mkl@pengutronix.de> can: mcp251xfd: mcp251xfd_tx_obj_from_skb(): clean up padding of CAN-FD frames

CAN-FD frames have only specific frame length (0, 1, 2, 3, 4, 5, 6, 7, 8, 12,
16, 20, 24, 32, 48, 64). A CAN-FD frame provided by user space might not cover
the whole CAN-FD frame. To avoid sending garbage over the CAN bus the driver
pads the CAN frame with 0x0 (if MCP251XFD_SANITIZE_CAN is activated).

This patch cleans up the pad len calculation. Rounding to full u32 brings no
benefit, in case of CRC transfers, the hw_tx_obj->data is not aligned to u32
anyway.

Link: https://lore.kernel.org/r/20210114153448.1506901-3-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>