Skip to content

Commit

Permalink
drivers: can: shell: print raw DLC when sending frame, not bytes
Browse files Browse the repository at this point in the history
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 <hebad@vestas.com>
(cherry picked from commit 6a070ee)
  • Loading branch information
henrikbrixandersen committed May 27, 2024
1 parent fb3e5ec commit 71af368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/can/can_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ static int cmd_can_send(const struct shell *sh, size_t argc, char **argv)
(frame.flags & CAN_FRAME_RTR) != 0 ? 1 : 0,
(frame.flags & CAN_FRAME_FDF) != 0 ? 1 : 0,
(frame.flags & CAN_FRAME_BRS) != 0 ? 1 : 0,
can_dlc_to_bytes(frame.dlc));
frame.dlc);

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

0 comments on commit 71af368

Please sign in to comment.