can: rx-offload: can_rx_offload_add_manual(): add new initialization function
This patch adds a new initialization function: can_rx_offload_add_manual() It should be used to add support rx-offload to a driver, if the callback mechanism should not be used. Use e.g. can_rx_offload_queue_sorted() to queue skbs into rx-offload. Link: https://lore.kernel.org/r/20200915223527.1417033-33-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
b2527eb271
commit
728fc9ff73
|
@ -351,6 +351,17 @@ int can_rx_offload_add_fifo(struct net_device *dev,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(can_rx_offload_add_fifo);
|
EXPORT_SYMBOL_GPL(can_rx_offload_add_fifo);
|
||||||
|
|
||||||
|
int can_rx_offload_add_manual(struct net_device *dev,
|
||||||
|
struct can_rx_offload *offload,
|
||||||
|
unsigned int weight)
|
||||||
|
{
|
||||||
|
if (offload->mailbox_read)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return can_rx_offload_init_queue(dev, offload, weight);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(can_rx_offload_add_manual);
|
||||||
|
|
||||||
void can_rx_offload_enable(struct can_rx_offload *offload)
|
void can_rx_offload_enable(struct can_rx_offload *offload)
|
||||||
{
|
{
|
||||||
napi_enable(&offload->napi);
|
napi_enable(&offload->napi);
|
||||||
|
|
|
@ -35,6 +35,9 @@ int can_rx_offload_add_timestamp(struct net_device *dev,
|
||||||
int can_rx_offload_add_fifo(struct net_device *dev,
|
int can_rx_offload_add_fifo(struct net_device *dev,
|
||||||
struct can_rx_offload *offload,
|
struct can_rx_offload *offload,
|
||||||
unsigned int weight);
|
unsigned int weight);
|
||||||
|
int can_rx_offload_add_manual(struct net_device *dev,
|
||||||
|
struct can_rx_offload *offload,
|
||||||
|
unsigned int weight);
|
||||||
int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
|
int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
|
||||||
u64 reg);
|
u64 reg);
|
||||||
int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload);
|
int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload);
|
||||||
|
|
Loading…
Reference in New Issue