mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
r8152: drop local patches
This commit is contained in:
parent
d72088314d
commit
25d3a71cbf
@ -7,16 +7,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8152
|
||||
PKG_VERSION:=2.16.3.20220914
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=2.16.3-4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=61ed7af34c8882c6028ddd1a27bb78fb5bfba41211f84dd7a06e4dc84dbe9a9a
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8152-dkms/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=a80563c6abb05f4aeab5be9d63b0497859878c86e0f72c49dd527de2adec7b68
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
@ -24,32 +21,20 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/usb-net-rtl8152-vendor
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
|
||||
TITLE:=Realtek RTL8152/RTL8153/RTL8154/RTL8156 driver
|
||||
SUBMENU:=USB Support
|
||||
DEPENDS:=+kmod-usb-net
|
||||
FILES:=$(PKG_BUILD_DIR)/r8152.ko
|
||||
FILES:=$(PKG_BUILD_DIR)/src/r8152.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8152)
|
||||
CONFLICTS:=kmod-usb-net-rtl8152
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-net-rtl8152-vendor/description
|
||||
Kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
|
||||
Kernel module for Realtek RTL8152 USB Ethernet chipsets
|
||||
endef
|
||||
|
||||
R8152_MAKEOPTS= -C $(PKG_BUILD_DIR) \
|
||||
PATH="$(TARGET_PATH)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
TARGET="$(HAL_TARGET)" \
|
||||
TOOLPREFIX="$(KERNEL_CROSS)" \
|
||||
TOOLPATH="$(KERNEL_CROSS)" \
|
||||
KERNELPATH="$(LINUX_DIR)" \
|
||||
KERNELDIR="$(LINUX_DIR)" \
|
||||
LDOPTS=" " \
|
||||
DOMULTI=1
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) $(R8152_MAKEOPTS) modules
|
||||
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR)/src modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-net-rtl8152-vendor))
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- 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, 19, 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.
|
||||
*/
|
@ -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) {
|
Loading…
Reference in New Issue
Block a user