MLK-19787 can: flexcan: fix CAN can't receive remote request frame
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 18 Oct 2018 05:06:19 +0000 (13:06 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commite7dcfe25fc70241ae613c792b6ff80e4abeb753f
treea2798ab91956d7f2597846630973dde589591c7a
parentea404344c42391b4a5f465504a927ddb79bb6a7d
MLK-19787 can: flexcan: fix CAN can't receive remote request frame

The flexcan driver allocates canfd-skb no matter whether use CAN FD
mode or not, it's unreasonable due to it will affect the parse of the
remote request frame.

To fix the issue, allocating can-skb with "alloc_can_skb()" in normal
mode and canfd-skb with "alloc_canfd_skb()" in fd mode.

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/net/can/flexcan.c
drivers/net/can/rx-offload.c
include/linux/can/rx-offload.h