netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de, Oliver Hartkopp <socketcan@hartkopp.net>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net 3/9] can: dev: fix missing CAN XL support in can_put_echo_skb()
Date: Mon, 15 May 2023 22:47:16 +0200	[thread overview]
Message-ID: <20230515204722.1000957-4-mkl@pengutronix.de> (raw)
In-Reply-To: <20230515204722.1000957-1-mkl@pengutronix.de>

From: Oliver Hartkopp <socketcan@hartkopp.net>

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 <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230506184515.39241-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/dev/skb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c
index 241ec636e91f..f6d05b3ef59a 100644
--- a/drivers/net/can/dev/skb.c
+++ b/drivers/net/can/dev/skb.c
@@ -54,7 +54,8 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
 	/* 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;
 	}
-- 
2.39.2



  parent reply	other threads:[~2023-05-15 20:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 20:47 [PATCH net 0/9] pull-request: can 2023-05-15 Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 1/9] can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag Marc Kleine-Budde
2023-05-17  4:00   ` patchwork-bot+netdevbpf
2023-05-15 20:47 ` [PATCH net 2/9] can: j1939: " Marc Kleine-Budde
2023-05-15 20:47 ` Marc Kleine-Budde [this message]
2023-05-15 20:47 ` [PATCH net 4/9] can: CAN_BXCAN should depend on ARCH_STM32 Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 5/9] dt-bindings: net: can: add "st,can-secondary" property Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 6/9] ARM: dts: stm32f429: put can2 in secondary mode Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 7/9] ARM: dts: stm32: add pin map for CAN controller on stm32f7 Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 8/9] can: bxcan: add support for single peripheral configuration Marc Kleine-Budde
2023-05-15 20:47 ` [PATCH net 9/9] ARM: dts: stm32: add CAN support on stm32f746 Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230515204722.1000957-4-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).