From: Doug Brown Date: Fri, 13 Sep 2024 14:31:48 +0000 (+0100) Subject: hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check X-Git-Tag: v9.2.0-rc0~88^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd1e485facbeae99452a534c5d26e48bb69d7ecd;p=thirdparty%2Fqemu.git 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 Reviewed-by: Pavel Pisa Reviewed-by: Francisco Iglesias Message-id: 20240827034927.66659-3-doug@schmorgal.com Signed-off-by: Peter Maydell --- diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c index f89dfc565b5..add1e0fbf17 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. */