android_kernel_motorola_sm6375/net/can
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alexander Hölzl 1abecca55d can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero
commit 44de577e61ed239db09f0da9d436866bef9b77dd upstream.

The J1939 standard requires the transmission of messages of length 0.

For example proprietary messages are specified with a data length of 0
to 1785. The transmission of such messages is not possible. Sending
results in no error being returned but no corresponding can frame
being generated.

Enable the transmission of zero length J1939 messages. In order to
facilitate this two changes are necessary:

1) If the transmission of a new message is requested from user space
the message is segmented in j1939_sk_send_loop(). Let the segmentation
take into account zero length messages, do not terminate immediately,
queue the corresponding skb.

2) j1939_session_skb_get_by_offset() selects the next skb to transmit
for a session. Take into account that there might be zero length skbs
in the queue.

Signed-off-by: Alexander Hölzl <[email protected]>
Acked-by: Oleksij Rempel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Fixes: 9d71dd0c70 ("can: add support of SAE J1939 protocol")
Cc: [email protected]
[mkl: commit message rephrased]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-03-13 12:43:16 +01:00
..
j1939 can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero 2025-03-13 12:43:16 +01:00
af_can.c net: af_can: do not leave a dangling sk pointer in can_create() 2024-12-14 19:44:51 +01:00
af_can.h
bcm.c can: bcm: Clear bo->bcm_proc_read after remove_proc_entry(). 2024-11-08 16:20:27 +01:00
gw.c can: gw: synchronize rcu operations before removing gw job entry 2021-07-14 16:53:04 +02:00
Kconfig
Makefile
proc.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +02:00
raw.c can: raw: add support for SO_MARK 2024-01-15 18:25:25 +01:00