r8101: fix build with kernel 6.1
This commit is contained in:
parent
5dea36329c
commit
79ce0aadcc
5
Makefile
5
Makefile
@ -7,10 +7,11 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8101
|
||||
PKG_VERSION:=1.037.01
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.038.02
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
14
patches/010-6.1-support.patch
Normal file
14
patches/010-6.1-support.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/r8101.h
|
||||
+++ b/r8101.h
|
||||
@@ -492,7 +492,11 @@ typedef int *napi_budget;
|
||||
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(ndev, &priv->napi, function, weight)
|
||||
+#else
|
||||
+#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(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;
|
Loading…
Reference in New Issue
Block a user