diff options
Diffstat (limited to 'net/can/bcm.c')
-rw-r--r-- | net/can/bcm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index e60161bec850..e5d179ba6f7d 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -648,8 +648,13 @@ static void bcm_rx_handler(struct sk_buff *skb, void *data) return; /* make sure to handle the correct frame type (CAN / CAN FD) */ - if (skb->len != op->cfsiz) - return; + if (op->flags & CAN_FD_FRAME) { + if (!can_is_canfd_skb(skb)) + return; + } else { + if (!can_is_can_skb(skb)) + return; + } /* disable timeout */ hrtimer_cancel(&op->timer); |