From 07adaa5bebdbb9c6a2e4ba5dde1dd4996f6b5f26 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 4 Aug 2022 17:49:52 +0000 Subject: [PATCH] r8152: add kernel 5.19 support --- .../lean/r8152/patches/010-5.19-support.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/lean/r8152/patches/010-5.19-support.patch diff --git a/package/lean/r8152/patches/010-5.19-support.patch b/package/lean/r8152/patches/010-5.19-support.patch new file mode 100644 index 000000000..304686232 --- /dev/null +++ b/package/lean/r8152/patches/010-5.19-support.patch @@ -0,0 +1,19 @@ +--- a/r8152.c ++++ b/r8152.c +@@ -1026,6 +1026,16 @@ + #define RTL_ADVERTISED_1000_FULL BIT(5) + #define RTL_ADVERTISED_2500_FULL BIT(6) + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++static inline void netif_set_gso_max_size(struct net_device *dev, ++ unsigned int size) ++{ ++ /* dev->gso_max_size is read locklessly from sk_setup_caps() */ ++ WRITE_ONCE(dev->gso_max_size, size); ++} ++#endif ++ ++ + /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). + * The RTL chips use a 64 element hash table based on the Ethernet CRC. + */