mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 10:31:51 +00:00
Update r8125
This commit is contained in:
parent
31ea55283c
commit
d1760e0efb
1 changed files with 14 additions and 0 deletions
14
r8125/patches/021-6.1-suppot.patch
Normal file
14
r8125/patches/021-6.1-suppot.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/src/r8125.h
|
||||
+++ b/src/r8125.h
|
||||
@@ -633,7 +633,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;
|
Loading…
Reference in a new issue