]> git.ipfire.org Git - thirdparty/linux.git/commit
can: netlink: make can_tdc_get_size() FD agnostic
authorVincent Mailhol <mailhol@kernel.org>
Tue, 23 Sep 2025 06:58:37 +0000 (15:58 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Sep 2025 15:09:45 +0000 (17:09 +0200)
commit63888a57801656ee1204f750ec4f98bd75fe44aa
tree14b14acef098b94aa7626ca52ec9140e397df22f
parente1a5cd9d6665c44119d5e664ecaccdb6467aecda
can: netlink: make can_tdc_get_size() FD agnostic

can_tdc_get_size() needs to access can_priv->fd making it specific to
CAN FD. Change the function parameter from struct can_priv to struct
data_bittiming_params.

can_tdc_get_size() also uses the CAN_CTRLMODE_TDC_MANUAL macro making
it specific to CAN FD. Add the tdc mask to the function parameter
list. The value of the tdc manual 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-12-e720d28f66fe@kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/netlink.c