Merge branch 'fix-5.18' into 'master'

Fix for linux 5.18.0

See merge request etherlab.org/ethercat!52
This commit is contained in:
Florian Pose 2022-09-05 09:15:06 +00:00
commit 19be4c8da4
1 changed files with 4 additions and 0 deletions

View File

@ -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;