Skip to content

Commit 1c606f5

Browse files
drivers: can: shell: print raw DLC when sending frame, not bytes
Print the raw DLC when enqueuing a CAN frame for sending, not the corresponding number of bytes. Fixes: #73309 Signed-off-by: Henrik Brix Andersen <[email protected]> (cherry picked from commit 6a070ee)
1 parent a5d72fe commit 1c606f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/can/can_shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ static int cmd_can_send(const struct shell *sh, size_t argc, char **argv)
781781
(frame.flags & CAN_FRAME_RTR) != 0 ? 1 : 0,
782782
(frame.flags & CAN_FRAME_FDF) != 0 ? 1 : 0,
783783
(frame.flags & CAN_FRAME_BRS) != 0 ? 1 : 0,
784-
can_dlc_to_bytes(frame.dlc));
784+
frame.dlc);
785785

786786
err = can_send(dev, &frame, K_NO_WAIT, can_shell_tx_callback, UINT_TO_POINTER(frame_no));
787787
if (err != 0) {

0 commit comments

Comments
 (0)