Package: r8168 / 8.043.02-1

linux-2.6.32.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Author: Andreas Beckmann <anbe@debian.org>
Description: disable some bits not available in older 2.6 kernels

--- a/src/r8168_n.c
+++ b/src/r8168_n.c
@@ -22941,11 +22941,15 @@ rtl8168_init_one(struct pci_dev *pdev,
                 dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
                                      NETIF_F_HIGHDMA;
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
                 dev->hw_features |= NETIF_F_RXALL;
                 dev->hw_features |= NETIF_F_RXFCS;
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
                 if ((tp->mcfg == CFG_METHOD_1) || (tp->mcfg == CFG_METHOD_2) || (tp->mcfg == CFG_METHOD_3)) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
                         dev->hw_features &= ~NETIF_F_IPV6_CSUM;
+#endif
                         netif_set_gso_max_size(dev, LSO_32K);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
                         dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO_64K;
@@ -22954,7 +22958,9 @@ rtl8168_init_one(struct pci_dev *pdev,
 #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
 #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
                 } else {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
                         dev->hw_features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
+#endif
                         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)
@@ -23374,8 +23380,10 @@ rtl8168_hw_config(struct net_device *dev
                 dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
         } else {
                 dev->features |= NETIF_F_IP_CSUM;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
                 if (dev->hw_features & NETIF_F_IPV6_CSUM)
                         dev->features |= NETIF_F_IPV6_CSUM;
+#endif
         }
 #endif