aboutsummaryrefslogtreecommitdiff
path: root/hw/net/can
diff options
context:
space:
mode:
authorDoug Brown <doug@schmorgal.com>2024-09-13 15:31:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-09-13 15:31:48 +0100
commitcd1e485facbeae99452a534c5d26e48bb69d7ecd (patch)
treee58d017491a3654cfa9e950ea409edee11969405 /hw/net/can
parent2215e297b9af4a42fefd1c014f7a3048995cea97 (diff)
hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check
When checking the QEMU_CAN_FRMF_TYPE_FD flag, we need to ignore other potentially set flags. Before this change, received CAN FD frames from SocketCAN weren't being recognized as CAN FD. Signed-off-by: Doug Brown <doug@schmorgal.com> Reviewed-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com> Message-id: 20240827034927.66659-3-doug@schmorgal.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net/can')
-rw-r--r--hw/net/can/xlnx-versal-canfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c
index f89dfc565b..add1e0fbf1 100644
--- a/hw/net/can/xlnx-versal-canfd.c
+++ b/hw/net/can/xlnx-versal-canfd.c
@@ -1003,7 +1003,7 @@ static void store_rx_sequential(XlnxVersalCANFDState *s,
dlc = frame->can_dlc;
- if (frame->flags == QEMU_CAN_FRMF_TYPE_FD) {
+ if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) {
is_canfd_frame = true;
/* Store dlc value in Xilinx specific format. */