]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: netlink: Fix TDCO calculation using the old data bittiming
authorMaxime Jayat <maxime.jayat@mobile-devices.fr>
Mon, 6 Nov 2023 18:01:58 +0000 (19:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:17 +0000 (09:25 +0100)
commit6019c77391a69e1a283499e23faff89cc5856be8
tree4bd02b23af4b6c0b8d10522997bd8419f209e4dc
parent23429e2c33dda09a78ff366c742a7389b08e3f1f
can: netlink: Fix TDCO calculation using the old data bittiming

commit 2aa0a5e65eae27dbd96faca92c84ecbf6f492d42 upstream.

The TDCO calculation was done using the currently applied data bittiming,
instead of the newly computed data bittiming, which means that the TDCO
had an invalid value unless setting the same data bittiming twice.

Fixes: d99755f71a80 ("can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC)")
Signed-off-by: Maxime Jayat <maxime.jayat@mobile-devices.fr>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/40579c18-63c0-43a4-8d4c-f3a6c1c0b417@munic.io
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/dev/netlink.c