can: isotp: fix support for transmission of SF without flow control
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 21 Aug 2023 14:45:46 +0000 (16:45 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Aug 2023 00:18:50 +0000 (17:18 -0700)
commit0bfe71159230bab79ee230225ae12ffecbb69f3e
tree6c876b4965412ad45597a1e0147c963c60d88c31
parentbf23ffc8a9a777dfdeb04232e0946b803adbb6a9
can: isotp: fix support for transmission of SF without flow control

The original implementation had a very simple handling for single frame
transmissions as it just sent the single frame without a timeout handling.

With the new echo frame handling the echo frame was also introduced for
single frames but the former exception ('simple without timers') has been
maintained by accident. This leads to a 1 second timeout when closing the
socket and to an -ECOMM error when CAN_ISOTP_WAIT_TX_DONE is selected.

As the echo handling is always active (also for single frames) remove the
wrong extra condition for single frames.

Fixes: 9f39d36530e5 ("can: isotp: add support for transmission without flow control")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20230821144547.6658-2-socketcan@hartkopp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/can/isotp.c