History

can: rx-offload: Prepare for CAN FD support

The skbs for classic CAN and CAN FD frames are allocated with seperate functions: alloc_can_skb() and alloc_canfd_skb(). In order to support CAN FD frames via the rx-offload helper, the driver itself has to allocate the skb (depending whether it received a classic CAN or CAN FD frame), as the rx-offload helper cannot know which kind of CAN frame the driver has received. This patch moves the allocation of the skb into the struct can_rx_offload::mailbox_read callbacks of the the flexcan and ti_hecc driver and adjusts the rx-offload helper accordingly.

Joakim Zhang committed 7 years ago

Commit 4e9c9481 parent 61d23504 files · +60 −69Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/can/rx-offload.h+3−3
@@ -15,9 +15,9 @@ · 14 unmodified lines
15struct can_rx_offload {15struct can_rx_offload {
16 struct net_device *dev;16 struct net_device *dev;
17 17
18 unsigned int (*mailbox_read)(struct can_rx_offload *offload,18 struct sk_buff *(*mailbox_read)(struct can_rx_offload *offload,
19 struct can_frame *cf,19 unsigned int mb, u32 *timestamp,
20 u32 *timestamp, unsigned int mb);20 bool drop);
21 21
22 struct sk_buff_head skb_queue;22 struct sk_buff_head skb_queue;
23 u32 skb_queue_len_max;23 u32 skb_queue_len_max;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t