From a1a1c8a10c6a6e12c3c9a40ab5db356e45496079 Mon Sep 17 00:00:00 2001 From: aiamadeus <2789289348@qq.com> Date: Sun, 24 Sep 2023 23:35:40 +0800 Subject: [PATCH 1/3] r8168: update to 8.052.01 --- package/lean/r8168/Makefile | 9 ++++----- .../lean/r8168/patches/020-5.19-support.patch | 18 ------------------ .../lean/r8168/patches/030-6.1-support.patch | 14 -------------- ...=> 100-add-LED-configuration-from-OF.patch} | 10 +++++----- 4 files changed, 9 insertions(+), 42 deletions(-) delete mode 100644 package/lean/r8168/patches/020-5.19-support.patch delete mode 100644 package/lean/r8168/patches/030-6.1-support.patch rename package/lean/r8168/patches/{001-r8168-add-LED-configuration-from-OF.patch => 100-add-LED-configuration-from-OF.patch} (77%) diff --git a/package/lean/r8168/Makefile b/package/lean/r8168/Makefile index 8f810c518434d3..c1e59280aa5c4b 100644 --- a/package/lean/r8168/Makefile +++ b/package/lean/r8168/Makefile @@ -7,13 +7,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8168 -PKG_VERSION:=8.051.02 +PKG_VERSION:=8.052.01 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/BROBIRD/openwrt-r8168.git -PKG_SOURCE_VERSION:=4f6cfe1ca12fb772deed57f1d2d1062af041ad07 -PKG_MIRROR_HASH:=6b149f5eb3b9e1dc50867a694984d253aa58d97dd5fbab30eb405d2d7b2be587 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/mtorromeo/r8168/tar.gz/$(PKG_VERSION)? +PKG_HASH:=cd8ee58a260e9b654080d39e3a42e3a3fb821041ee79e631b4647d84120aa999 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/lean/r8168/patches/020-5.19-support.patch b/package/lean/r8168/patches/020-5.19-support.patch deleted file mode 100644 index d4dca31255a876..00000000000000 --- a/package/lean/r8168/patches/020-5.19-support.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/src/r8168_n.c -+++ b/src/r8168_n.c -@@ -116,6 +116,15 @@ - #define FIRMWARE_8168FP_3 "rtl_nic/rtl8168fp-3.fw" - #define FIRMWARE_8168FP_4 "rtl_nic/rtl8168fp-4.fw" - -+#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. */ - static const int multicast_filter_limit = 32; diff --git a/package/lean/r8168/patches/030-6.1-support.patch b/package/lean/r8168/patches/030-6.1-support.patch deleted file mode 100644 index 44ab2be19384f4..00000000000000 --- a/package/lean/r8168/patches/030-6.1-support.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/r8168.h ---- b/src/r8168.h -@@ -566,7 +566,11 @@ - typedef struct napi_struct *napi_ptr; - typedef int napi_budget; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) -+#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(ndev, &priv->napi, function, weight) -+#else - #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight) -+#endif - #define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget) - #define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr, priv_struct, stuct_ptr) - #define RTL_GET_NETDEV(priv_ptr) struct net_device *dev = priv_ptr->dev; diff --git a/package/lean/r8168/patches/001-r8168-add-LED-configuration-from-OF.patch b/package/lean/r8168/patches/100-add-LED-configuration-from-OF.patch similarity index 77% rename from package/lean/r8168/patches/001-r8168-add-LED-configuration-from-OF.patch rename to package/lean/r8168/patches/100-add-LED-configuration-from-OF.patch index 891cabe76b0f26..62e2e56b842531 100644 --- a/package/lean/r8168/patches/001-r8168-add-LED-configuration-from-OF.patch +++ b/package/lean/r8168/patches/100-add-LED-configuration-from-OF.patch @@ -8,8 +8,8 @@ #include #include #include -@@ -24769,6 +24770,22 @@ rtl8168_set_bios_setting(struct net_devi - } +@@ -25852,6 +25853,22 @@ rtl8168_setup_mqs_reg(struct rtl8168_pri + tp->imr_reg[3] = IntrMask3; } +static int rtl8168_led_configuration(struct rtl8168_private *tp) @@ -31,9 +31,9 @@ static void rtl8168_init_software_variable(struct net_device *dev) { -@@ -25343,6 +25360,8 @@ rtl8168_init_software_variable(struct ne - tp->NotWrMcuPatchCode = TRUE; - } +@@ -26547,6 +26564,8 @@ err1: + if (tp->InitRxDescType == RX_DESC_RING_TYPE_2) + tp->RxDescLength = RX_DESC_LEN_TYPE_2; + rtl8168_led_configuration(tp); + From 3dac5fb33dcd4a2d7b0fde01f61ca87d72342dfa Mon Sep 17 00:00:00 2001 From: aiamadeus <2789289348@qq.com> Date: Tue, 17 Oct 2023 23:38:21 +0800 Subject: [PATCH 2/3] r8152: update to 2.17.1-3 --- package/lean/r8152/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/lean/r8152/Makefile b/package/lean/r8152/Makefile index 075f298b40d389..6defa1b9b0ecb4 100644 --- a/package/lean/r8152/Makefile +++ b/package/lean/r8152/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8152 -PKG_VERSION:=2.16.3-4 -PKG_RELEASE:=3 +PKG_VERSION:=2.17.1-3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8152-dkms/tar.gz/$(PKG_VERSION)? -PKG_HASH:=a80563c6abb05f4aeab5be9d63b0497859878c86e0f72c49dd527de2adec7b68 +PKG_HASH:=3e0486d412cb05ede0571b19fa6d402c1448b0220e5ae54aa5b11af918ad9a43 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION) PKG_MAINTAINER:=Tianling Shen From bc4708a64cf8a001f6ed7064c7d9b9e154df1433 Mon Sep 17 00:00:00 2001 From: aiamadeus <2789289348@qq.com> Date: Tue, 7 Nov 2023 21:39:02 +0800 Subject: [PATCH 3/3] r8125: update to 9.012.03-1 Closed: #11646 --- package/lean/r8125/Makefile | 4 ++-- package/lean/r8125/patches/010-config.patch | 2 +- package/lean/r8125/patches/020-fixes-build-werror.patch | 2 +- .../r8125/patches/030-add-LED-configuration-from-OF.patch | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/lean/r8125/Makefile b/package/lean/r8125/Makefile index 9a12708854dcd9..16062ab3772b90 100644 --- a/package/lean/r8125/Makefile +++ b/package/lean/r8125/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8125 -PKG_VERSION:=9.010.01-2 +PKG_VERSION:=9.012.03-1 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)? -PKG_HASH:=b3e1b36578ba92a775049535e7434a9fc46710a721846c3706aca3d265db8cb9 +PKG_HASH:=7964aacf4a2873cbe4133aeca830bd0725f819ea286bab162026ff283510144f PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0-only diff --git a/package/lean/r8125/patches/010-config.patch b/package/lean/r8125/patches/010-config.patch index e7934c01c28108..fe4e7008d75df1 100644 --- a/package/lean/r8125/patches/010-config.patch +++ b/package/lean/r8125/patches/010-config.patch @@ -19,4 +19,4 @@ +ENABLE_RSS_SUPPORT = y ENABLE_LIB_SUPPORT = n ENABLE_USE_FIRMWARE_FILE = n - DISABLE_PM_SUPPORT = n + DISABLE_WOL_SUPPORT = n diff --git a/package/lean/r8125/patches/020-fixes-build-werror.patch b/package/lean/r8125/patches/020-fixes-build-werror.patch index 4b6895c98a527c..640b50b1a1f85c 100644 --- a/package/lean/r8125/patches/020-fixes-build-werror.patch +++ b/package/lean/r8125/patches/020-fixes-build-werror.patch @@ -1,6 +1,6 @@ --- a/src/r8125_rss.c +++ b/src/r8125_rss.c -@@ -57,21 +57,21 @@ static int rtl8125_get_rss_hash_opts(struct rtl8125_private *tp, +@@ -60,21 +60,21 @@ static int rtl8125_get_rss_hash_opts(str switch (cmd->flow_type) { case TCP_V4_FLOW: cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; diff --git a/package/lean/r8125/patches/030-add-LED-configuration-from-OF.patch b/package/lean/r8125/patches/030-add-LED-configuration-from-OF.patch index d0317c42764b34..9b5d8d34064148 100644 --- a/package/lean/r8125/patches/030-add-LED-configuration-from-OF.patch +++ b/package/lean/r8125/patches/030-add-LED-configuration-from-OF.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -10416,6 +10417,23 @@ rtl8125_setup_mqs_reg(struct rtl8125_private *tp) +@@ -14818,6 +14819,23 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri } } @@ -32,7 +32,7 @@ static void rtl8125_init_software_variable(struct net_device *dev) { -@@ -10847,6 +10865,8 @@ rtl8125_init_software_variable(struct net_device *dev) +@@ -15384,6 +15402,8 @@ rtl8125_init_software_variable(struct ne if (tp->InitRxDescType == RX_DESC_RING_TYPE_3) tp->rtl8125_rx_config |= EnableRxDescV3;