Commit b45d71b7 authored by Gwenhael Goavec-Merou's avatar Gwenhael Goavec-Merou Committed by Juan David González Cobas

spec-sw: kernel: nic-core: last_rx is no more available since kernel > 4.11

struct net_device has no more last_rx. According to [1] this line must be
simply supressed for kernel > 4.11 to avoid build failure like :

spec-sw/kernel/wr_nic/nic-core.c: In function '__wrn_rx_descriptor':
spec-sw/kernel/wr_nic/nic-core.c:428:5: error: 'struct net_device' has no member named 'last_rx'
  dev->last_rx = jiffies;
     ^~
make[5]: *** [/usr/src/linux-headers-4.18.0-2-common/scripts/Makefile.build:323: spec-sw/kernel/wr_nic/nic-core.o] Error 1
make[4]: *** [/usr/src/linux-headers-4.18.0-2-common/Makefile:1531: _module_spec-sw/kernel] Error 2
make[3]: *** [Makefile:146: sub-make] Error 2
make[2]: *** [Makefile:8: all] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.18.0-2-amd64'
make[1]: *** [Makefile:20: all] Error 2
make[1]: Leaving directory 'spec-sw/kernel'
make: *** [Makefile:28: kernel] Error 2

[1] https://patchwork.ozlabs.org/patch/716831/Signed-off-by: 's avatarGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
parent a0b90f50
...@@ -425,7 +425,9 @@ static void __wrn_rx_descriptor(struct wrn_dev *wrn, int desc) ...@@ -425,7 +425,9 @@ static void __wrn_rx_descriptor(struct wrn_dev *wrn, int desc)
skb->protocol = eth_type_trans(skb, dev); skb->protocol = eth_type_trans(skb, dev);
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
#if KERNEL_VERSION(4,11,0) > LINUX_VERSION_CODE
dev->last_rx = jiffies; dev->last_rx = jiffies;
#endif
ep->stats.rx_packets++; ep->stats.rx_packets++;
ep->stats.rx_bytes += len; ep->stats.rx_bytes += len;
netif_receive_skb(skb); netif_receive_skb(skb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment