hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/can/rx-offload.h
....@@ -1,17 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/can/rx-offload.h
34 *
45 * Copyright (c) 2014 David Jander, Protonic Holland
56 * Copyright (c) 2014-2017 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the version 2 of the GNU General Public License
9
- * as published by the Free Software Foundation
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
157 */
168
179 #ifndef _CAN_RX_OFFLOAD_H
....@@ -23,8 +15,9 @@
2315 struct can_rx_offload {
2416 struct net_device *dev;
2517
26
- unsigned int (*mailbox_read)(struct can_rx_offload *offload, struct can_frame *cf,
27
- u32 *timestamp, unsigned int mb);
18
+ struct sk_buff *(*mailbox_read)(struct can_rx_offload *offload,
19
+ unsigned int mb, u32 *timestamp,
20
+ bool drop);
2821
2922 struct sk_buff_head skb_queue;
3023 u32 skb_queue_len_max;
....@@ -37,9 +30,16 @@
3730 bool inc;
3831 };
3932
40
-int can_rx_offload_add_timestamp(struct net_device *dev, struct can_rx_offload *offload);
41
-int can_rx_offload_add_fifo(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight);
42
-int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, u64 reg);
33
+int can_rx_offload_add_timestamp(struct net_device *dev,
34
+ struct can_rx_offload *offload);
35
+int can_rx_offload_add_fifo(struct net_device *dev,
36
+ struct can_rx_offload *offload,
37
+ unsigned int weight);
38
+int can_rx_offload_add_manual(struct net_device *dev,
39
+ struct can_rx_offload *offload,
40
+ unsigned int weight);
41
+int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
42
+ u64 reg);
4343 int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload);
4444 int can_rx_offload_queue_sorted(struct can_rx_offload *offload,
4545 struct sk_buff *skb, u32 timestamp);
....@@ -47,7 +47,6 @@
4747 unsigned int idx, u32 timestamp);
4848 int can_rx_offload_queue_tail(struct can_rx_offload *offload,
4949 struct sk_buff *skb);
50
-void can_rx_offload_reset(struct can_rx_offload *offload);
5150 void can_rx_offload_del(struct can_rx_offload *offload);
5251 void can_rx_offload_enable(struct can_rx_offload *offload);
5352