]> git.ipfire.org Git - thirdparty/linux.git/commit
can: calc_bittiming: make can_calc_tdco() FD agnostic
authorVincent Mailhol <mailhol@kernel.org>
Tue, 23 Sep 2025 06:58:43 +0000 (15:58 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Sep 2025 15:09:46 +0000 (17:09 +0200)
commit6ffc1230d3a728e07d7d2464f388ad4bbefe90c2
tree48c470a925a3daf1279a3596c8f17981a5807ee2
parente72f1ba700e3d502cd0a604fda86e38431467a46
can: calc_bittiming: make can_calc_tdco() FD agnostic

can_calc_tdco() uses the CAN_CTRLMODE_FD_TDC_MASK and
CAN_CTRLMODE_TDC_AUTO macros making it specific to CAN FD. Add the tdc
mask to the function parameter list. The value of the tdc auto flag
can then be derived from that mask and stored in a local variable.
This way, the function becomes CAN FD agnostic and can be reused later
on for the CAN XL TDC.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Link: https://patch.msgid.link/20250923-canxl-netlink-prep-v4-18-e720d28f66fe@kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/calc_bittiming.c
drivers/net/can/dev/netlink.c
include/linux/can/bittiming.h