Skip to content

Commit 89d58ae

Browse files
brian-brtmarckleinebudde
authored andcommitted
can: gs_usb: gs_can_start_xmit(): zero-initialize hf->{flags,reserved}
No information is deliberately sent in hf->flags in host -> device communications, but the open-source candleLight firmware echoes it back, which can result in the GS_CAN_FLAG_OVERFLOW flag being set and generating spurious ERRORFRAMEs. While there also initialize the reserved member with 0. Fixes: d08e973 ("can: gs_usb: Added support for the GS_USB CAN devices") Link: https://lore.kernel.org/all/[email protected] Link: candle-usb/candleLight_fw#87 Cc: [email protected] Signed-off-by: Brian Silverman <[email protected]> [mkl: initialize the reserved member, too] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 72b1e36 commit 89d58ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/can/usb/gs_usb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
508508

509509
hf->echo_id = idx;
510510
hf->channel = dev->channel;
511+
hf->flags = 0;
512+
hf->reserved = 0;
511513

512514
cf = (struct can_frame *)skb->data;
513515

0 commit comments

Comments
 (0)