File r8168-support-linux-5.19.patch of Package r8168

23
 
1
---
2
 r8168-8.053.00/src/r8168_n.c |    9 +++++++++
3
 1 file changed, 9 insertions(+)
4
5
--- r8168-8.053.00/src/r8168_n.c
6
+++ r8168-8.053.00/src/r8168_n.c    2024-05-21 09:57:57.192604776 +0000
7
@@ -126,6 +126,15 @@
8
 #define FIRMWARE_8168FP_3   "rtl_nic/rtl8168fp-3.fw"
9
 #define FIRMWARE_8168FP_4   "rtl_nic/rtl8168fp-4.fw"
10
 
11
+#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 18, 0)
12
+static inline void netif_set_gso_max_size(struct net_device *dev,
13
+                                          unsigned int size)
14
+{
15
+        /* dev->gso_max_size is read locklessly from sk_setup_caps() */
16
+        WRITE_ONCE(dev->gso_max_size, size);
17
+}
18
+#endif
19
+
20
 static const struct {
21
         const char *name;
22
         const char *fw_name;
23