| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/can/rx-offload.h |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2014 David Jander, Protonic Holland |
|---|
| 5 | 6 | * 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. |
|---|
| 15 | 7 | */ |
|---|
| 16 | 8 | |
|---|
| 17 | 9 | #ifndef _CAN_RX_OFFLOAD_H |
|---|
| .. | .. |
|---|
| 23 | 15 | struct can_rx_offload { |
|---|
| 24 | 16 | struct net_device *dev; |
|---|
| 25 | 17 | |
|---|
| 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); |
|---|
| 28 | 21 | |
|---|
| 29 | 22 | struct sk_buff_head skb_queue; |
|---|
| 30 | 23 | u32 skb_queue_len_max; |
|---|
| .. | .. |
|---|
| 37 | 30 | bool inc; |
|---|
| 38 | 31 | }; |
|---|
| 39 | 32 | |
|---|
| 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); |
|---|
| 43 | 43 | int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload); |
|---|
| 44 | 44 | int can_rx_offload_queue_sorted(struct can_rx_offload *offload, |
|---|
| 45 | 45 | struct sk_buff *skb, u32 timestamp); |
|---|
| .. | .. |
|---|
| 47 | 47 | unsigned int idx, u32 timestamp); |
|---|
| 48 | 48 | int can_rx_offload_queue_tail(struct can_rx_offload *offload, |
|---|
| 49 | 49 | struct sk_buff *skb); |
|---|
| 50 | | -void can_rx_offload_reset(struct can_rx_offload *offload); |
|---|
| 51 | 50 | void can_rx_offload_del(struct can_rx_offload *offload); |
|---|
| 52 | 51 | void can_rx_offload_enable(struct can_rx_offload *offload); |
|---|
| 53 | 52 | |
|---|