From 480b6575ee3139c7984acfcc24d65349659f0403 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 27 Nov 2023 17:57:30 +0100 Subject: [PATCH] Remove no more needed patch for r8152 --- r8152/patches/020-6.1-support.patch | 38 ----------------------------- 1 file changed, 38 deletions(-) delete mode 100644 r8152/patches/020-6.1-support.patch diff --git a/r8152/patches/020-6.1-support.patch b/r8152/patches/020-6.1-support.patch deleted file mode 100644 index 756aba51f..000000000 --- a/r8152/patches/020-6.1-support.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/compatibility.h -+++ b/compatibility.h -@@ -237,9 +237,15 @@ - #define napi_disable(napi_ptr) netif_poll_disable(container_of(napi_ptr, struct r8152, napi)->netdev) - #define napi_schedule(napi_ptr) netif_rx_schedule(container_of(napi_ptr, struct r8152, napi)->netdev) - #define napi_complete(napi_ptr) netif_rx_complete(container_of(napi_ptr, struct r8152, napi)->netdev) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) -+ #define netif_napi_add_weight(ndev, napi_ptr, function, weight_t) \ -+ ndev->poll = function; \ -+ ndev->weight = weight_t; -+#else - #define netif_napi_add(ndev, napi_ptr, function, weight_t) \ - ndev->poll = function; \ - ndev->weight = weight_t; -+#endif - typedef unsigned long uintptr_t; - #define DMA_BIT_MASK(value) \ - (value < 64 ? ((1ULL << value) - 1) : 0xFFFFFFFFFFFFFFFFULL) ---- a/r8152.c -+++ b/r8152.c -@@ -20718,10 +20718,17 @@ - - usb_set_intfdata(intf, tp); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) -+ if (tp->support_2500full) -+ netif_napi_add_weight(netdev, &tp->napi, r8152_poll, 256); -+ else -+ netif_napi_add_weight(netdev, &tp->napi, r8152_poll, 64); -+#else - if (tp->support_2500full) - netif_napi_add(netdev, &tp->napi, r8152_poll, 256); - else - netif_napi_add(netdev, &tp->napi, r8152_poll, 64); -+#endif - - ret = register_netdev(netdev); - if (ret != 0) {