r8168: update to 8.052.01

This commit is contained in:
aiamadeus 2023-09-24 23:35:40 +08:00
parent f852316284
commit a1a1c8a10c
4 changed files with 9 additions and 42 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -8,8 +8,8 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -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);
+