can: dev: fix missing CAN XL support in can_put_echo_skb()
PATCH 1/1 can: dev: fix missing CAN XL support in can_put_echo_skb()
can_put_echo_skb() checks for the enabled IFF_ECHO flag and the correct ETH_P type of the given skbuff. When implementing the CAN XL support the new check for ETH_P_CANXL has been forgotten.
Fixes fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")
Signed-off-by Oliver Hartkopp <[email protected]>
--- drivers/net/can/dev/skb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/dev/skb.c +2 -1
@@ -52,11 +52,12 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,BUG_ON (idx >= priv->echo_skb_max);/* check flag whether this packet has to be looped back */ if (!(dev->flags &IFF_ECHO ) || (skb->protocol !=htons (ETH_P_CAN ) && - skb->protocol !=htons (ETH_P_CANFD ))) { + skb->protocol !=htons (ETH_P_CANFD ) && + skb->protocol !=htons (ETH_P_CANXL ))) {kfree_skb (skb);return 0 ; }if (!priv->echo_skb[idx]) {
Signature · 1 line
2.39.2