linux/drivers/net/can/dev/rx-offload.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2014      Protonic Holland,
 *                         David Jander
 * Copyright (C) 2014-2021, 2023 Pengutronix,
 *                         Marc Kleine-Budde <[email protected]>
 */

#include <linux/can/dev.h>
#include <linux/can/rx-offload.h>

struct can_rx_offload_cb {};

static inline struct can_rx_offload_cb *
can_rx_offload_get_cb(struct sk_buff *skb)
{}

static inline bool
can_rx_offload_le(struct can_rx_offload *offload,
		  unsigned int a, unsigned int b)
{}

static inline unsigned int
can_rx_offload_inc(struct can_rx_offload *offload, unsigned int *val)
{}

static int can_rx_offload_napi_poll(struct napi_struct *napi, int quota)
{}

static inline void
__skb_queue_add_sort(struct sk_buff_head *head, struct sk_buff *new,
		     int (*compare)(struct sk_buff *a, struct sk_buff *b))
{}

static int can_rx_offload_compare(struct sk_buff *a, struct sk_buff *b)
{}

/**
 * can_rx_offload_offload_one() - Read one CAN frame from HW
 * @offload: pointer to rx_offload context
 * @n: number of mailbox to read
 *
 * The task of this function is to read a CAN frame from mailbox @n
 * from the device and return the mailbox's content as a struct
 * sk_buff.
 *
 * If the struct can_rx_offload::skb_queue exceeds the maximal queue
 * length (struct can_rx_offload::skb_queue_len_max) or no skb can be
 * allocated, the mailbox contents is discarded by reading it into an
 * overflow buffer. This way the mailbox is marked as free by the
 * driver.
 *
 * Return: A pointer to skb containing the CAN frame on success.
 *
 *         NULL if the mailbox @n is empty.
 *
 *         ERR_PTR() in case of an error
 */
static struct sk_buff *
can_rx_offload_offload_one(struct can_rx_offload *offload, unsigned int n)
{}

int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
					 u64 pending)
{}
EXPORT_SYMBOL_GPL();

int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();

int can_rx_offload_queue_timestamp(struct can_rx_offload *offload,
				   struct sk_buff *skb, u32 timestamp)
{}
EXPORT_SYMBOL_GPL();

unsigned int
can_rx_offload_get_echo_skb_queue_timestamp(struct can_rx_offload *offload,
					    unsigned int idx, u32 timestamp,
					    unsigned int *frame_len_ptr)
{}
EXPORT_SYMBOL_GPL();

int can_rx_offload_queue_tail(struct can_rx_offload *offload,
			      struct sk_buff *skb)
{}
EXPORT_SYMBOL_GPL();

unsigned int
can_rx_offload_get_echo_skb_queue_tail(struct can_rx_offload *offload,
				       unsigned int idx,
				       unsigned int *frame_len_ptr)
{}
EXPORT_SYMBOL_GPL();

void can_rx_offload_irq_finish(struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();

void can_rx_offload_threaded_irq_finish(struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();

static int can_rx_offload_init_queue(struct net_device *dev,
				     struct can_rx_offload *offload,
				     unsigned int weight)
{}

int can_rx_offload_add_timestamp(struct net_device *dev,
				 struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();

int can_rx_offload_add_fifo(struct net_device *dev,
			    struct can_rx_offload *offload, unsigned int weight)
{}
EXPORT_SYMBOL_GPL();

int can_rx_offload_add_manual(struct net_device *dev,
			      struct can_rx_offload *offload,
			      unsigned int weight)
{}
EXPORT_SYMBOL_GPL();

void can_rx_offload_enable(struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();

void can_rx_offload_del(struct can_rx_offload *offload)
{}
EXPORT_SYMBOL_GPL();