diff options
author | Jan Charvat <charvj10@fel.cvut.cz> | 2020-09-14 10:09:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-09-30 19:11:36 +0200 |
commit | d44948ccbd56cde7be989da5cc872b0c05bf6224 (patch) | |
tree | b57ab94f03cea57f6e75c11bac3b9b20f30a503d /hw/net | |
parent | c3dfce9afd8437d22241d2f22fd126826a8e919f (diff) | |
download | qemu-d44948ccbd56cde7be989da5cc872b0c05bf6224.zip qemu-d44948ccbd56cde7be989da5cc872b0c05bf6224.tar.gz qemu-d44948ccbd56cde7be989da5cc872b0c05bf6224.tar.bz2 |
net/can: Initial host SocketCan support for CAN FD.
Signed-off-by: Jan Charvat <charvj10@fel.cvut.cz>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Reviewed-by: Vikram Garhwal <fnu.vikram@xilinx.com>
Message-Id: <41383d4eb3f35586c696a8e29c4dff4031a81338.1600069689.git.pisa@cmp.felk.cvut.cz>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/can/can_sja1000.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c index 2999329..ec66d42 100644 --- a/hw/net/can/can_sja1000.c +++ b/hw/net/can/can_sja1000.c @@ -268,6 +268,7 @@ static void buff2frame_pel(const uint8_t *buff, qemu_can_frame *frame) { uint8_t i; + frame->flags = 0; frame->can_id = 0; if (buff[0] & 0x40) { /* RTR */ frame->can_id = QEMU_CAN_RTR_FLAG; @@ -303,6 +304,7 @@ static void buff2frame_bas(const uint8_t *buff, qemu_can_frame *frame) { uint8_t i; + frame->flags = 0; frame->can_id = ((buff[0] << 3) & (0xff << 3)) + ((buff[1] >> 5) & 0x07); if (buff[1] & 0x10) { /* RTR */ frame->can_id = QEMU_CAN_RTR_FLAG; |