From 22feaeeebb26ecf842188a5409bdfee10bfbc218 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 27 Jan 2023 13:19:47 +0100 Subject: [PATCH] Bugfixed the SocketCAN send via setting the dev->d_len to dev->d_sndlen. The dev->d_len wouldn't be assigned otherwise. --- net/can/can_sendmsg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/can/can_sendmsg.c b/net/can/can_sendmsg.c index f41bcb6115..b635895f14 100644 --- a/net/can/can_sendmsg.c +++ b/net/can/can_sendmsg.c @@ -107,6 +107,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev, /* Copy the packet data into the device packet buffer and send it */ devif_send(dev, pstate->snd_buffer, pstate->snd_buflen, 0); + dev->d_len = dev->d_sndlen; if (dev->d_sndlen == 0) { return flags;