can: preserve skbuff protocol in can_put_echo_skb
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 28 Feb 2014 15:36:19 +0000 (16:36 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 7 Mar 2014 08:18:20 +0000 (09:18 +0100)
commita94bc9c46e8e3e1bb5f707e81fd8c60fd93266e6
tree9a91c5d0cad70cc4d9691f245d2385aaffc5230b
parenta8ca2efce43f81153b81c712f7d8faf7666f55cc
can: preserve skbuff protocol in can_put_echo_skb

The skbuff protocol value was formerly fixed/sanitized to ETH_P_CAN in
can_put_echo_skb(). With CAN FD this value has to be preserved.
This patch changes the hard assignment of the protocol value to a check of
valid protocol values for CAN and CAN FD.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c