]> git.pld-linux.org Git - packages/r8168.git/blob - kernel-5.19.patch
- fix building with kernel 5.19, rel 3
[packages/r8168.git] / kernel-5.19.patch
1 --- r8168-8.049.02/src/r8168_n.c.orig   2022-08-13 13:32:08.000000000 +0200
2 +++ r8168-8.049.02/src/r8168_n.c        2022-08-13 14:10:04.268095369 +0200
3 @@ -25602,6 +25602,10 @@
4  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
5                  if ((tp->mcfg == CFG_METHOD_1) || (tp->mcfg == CFG_METHOD_2) || (tp->mcfg == CFG_METHOD_3)) {
6                          dev->hw_features &= ~NETIF_F_IPV6_CSUM;
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
8 +                        netif_set_tso_max_size(dev, LSO_32K);
9 +                        netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO_64K);
10 +#else
11                          netif_set_gso_max_size(dev, LSO_32K);
12  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
13                          dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO_64K;
14 @@ -25609,6 +25613,7 @@
15                          dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
16  #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
17  #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
18 +#endif
19                  } else {
20                          dev->hw_features |= NETIF_F_IPV6_CSUM;
21                          dev->features |=  NETIF_F_IPV6_CSUM;
22 @@ -25616,6 +25621,10 @@
23                                  dev->hw_features |= NETIF_F_TSO6;
24                                  //dev->features |=  NETIF_F_TSO6;
25                          }
26 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
27 +                        netif_set_tso_max_size(dev, LSO_64K);
28 +                        netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO2);
29 +#else
30                          netif_set_gso_max_size(dev, LSO_64K);
31  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
32                          dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
33 @@ -25623,6 +25632,7 @@
34                          dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
35  #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
36  #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
37 +#endif
38                  }
39  #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
40  #endif //LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
This page took 0.05842 seconds and 3 git commands to generate.