mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
canfdtest: can_echo_gen(): introduce struct canfd_frame *tx_frame;
This commit is contained in:
+6
-4
@@ -332,13 +332,15 @@ static int can_echo_gen(void)
|
|||||||
while (running) {
|
while (running) {
|
||||||
if (unprocessed < inflight_count) {
|
if (unprocessed < inflight_count) {
|
||||||
/* still send messages */
|
/* still send messages */
|
||||||
tx_frames[send_pos].len = msg_len;
|
struct canfd_frame *tx_frame = &tx_frames[send_pos];
|
||||||
tx_frames[send_pos].can_id = can_id_ping;
|
|
||||||
|
tx_frame->len = msg_len;
|
||||||
|
tx_frame->can_id = can_id_ping;
|
||||||
recv_tx[send_pos] = false;
|
recv_tx[send_pos] = false;
|
||||||
|
|
||||||
for (i = 0; i < msg_len; i++)
|
for (i = 0; i < msg_len; i++)
|
||||||
tx_frames[send_pos].data[i] = counter + i;
|
tx_frame->data[i] = counter + i;
|
||||||
if (send_frame(&tx_frames[send_pos])) {
|
if (send_frame(tx_frame)) {
|
||||||
err = -1;
|
err = -1;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user