Skip to content

Instantly share code, notes, and snippets.

@ozmartian
Last active August 12, 2016 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozmartian/698c99ac7b9f4a5e5194f0591cd11ab0 to your computer and use it in GitHub Desktop.
Save ozmartian/698c99ac7b9f4a5e5194f0591cd11ab0 to your computer and use it in GitHub Desktop.
--- r8168-8.042.00/src/r8168_n.c.orig 2016-08-01 21:20:42.000000000 +0200
+++ r8168-8.042.00/src/r8168_n.c 2016-08-01 21:32:49.488072441 +0200
@@ -22800,7 +22800,9 @@
dev->hw_features &= ~NETIF_F_IPV6_CSUM;
netif_set_gso_max_size(dev, LSO_32K);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+#endif
dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO_64K;
#endif
} else {
@@ -22808,7 +22810,9 @@
dev->features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
netif_set_gso_max_size(dev, LSO_64K);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+#endif
dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
#endif
}
@@ -24970,7 +24974,11 @@
wmb();
txd->opts1 = cpu_to_le32(opts1);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
dev->trans_start = jiffies;
+#else
+ netif_trans_update(dev);
+#endif
tp->cur_tx += frags + 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment