From 4050913147cb417ab3776e3ffb42f7875aebc028 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Mon, 18 Jul 2022 11:20:16 +0200 Subject: [PATCH] Fix for linux 5.18.0 In recent kernels, netif_rx_ni() is just a wrapper around netif_rx(): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f9919f73c94ae00af4e6ad45179282122f24988 --- master/ethernet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/master/ethernet.c b/master/ethernet.c index 41606a37..244c788a 100644 --- a/master/ethernet.c +++ b/master/ethernet.c @@ -741,7 +741,11 @@ void ec_eoe_state_rx_fetch_data(ec_eoe_t *eoe /**< EoE handler */) eoe->rx_skb->dev = eoe->dev; eoe->rx_skb->protocol = eth_type_trans(eoe->rx_skb, eoe->dev); eoe->rx_skb->ip_summed = CHECKSUM_UNNECESSARY; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) + if (netif_rx(eoe->rx_skb)) { +#else if (netif_rx_ni(eoe->rx_skb)) { +#endif EC_SLAVE_WARN(eoe->slave, "EoE RX netif_rx failed.\n"); } eoe->rx_skb = NULL;