summaryrefslogtreecommitdiff
path: root/include/linux/can
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2018-09-18 12:40:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-01 11:37:29 +0300
commit169130c87a88c1d85433cb0ef469c826dbe2f2d1 (patch)
treebc3c6e680d3d15ac3bd37d875b7a2e1c24213e9d /include/linux/can
parent474673a94f1758a64b22c0c012eaae2ecdcf9810 (diff)
downloadlinux-169130c87a88c1d85433cb0ef469c826dbe2f2d1.tar.xz
can: rx-offload: introduce can_rx_offload_get_echo_skb() and can_rx_offload_queue_sorted() functions
commit 55059f2b7f868cd43b3ad30e28e18347e1b46ace upstream. Current CAN framework can't guarantee proper/chronological order of RX and TX-ECHO messages. To make this possible, drivers should use this functions instead of can_get_echo_skb(). Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/can')
-rw-r--r--include/linux/can/rx-offload.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/can/rx-offload.h b/include/linux/can/rx-offload.h
index cb31683bbe15..01a7c9e5d8d8 100644
--- a/include/linux/can/rx-offload.h
+++ b/include/linux/can/rx-offload.h
@@ -41,6 +41,10 @@ int can_rx_offload_add_timestamp(struct net_device *dev, struct can_rx_offload *
int can_rx_offload_add_fifo(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight);
int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, u64 reg);
int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload);
+int can_rx_offload_queue_sorted(struct can_rx_offload *offload,
+ struct sk_buff *skb, u32 timestamp);
+unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload,
+ unsigned int idx, u32 timestamp);
int can_rx_offload_irq_queue_err_skb(struct can_rx_offload *offload, struct sk_buff *skb);
void can_rx_offload_reset(struct can_rx_offload *offload);
void can_rx_offload_del(struct can_rx_offload *offload);