[PATCH 49/75] headere: add netif_napi_add_weight()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



netif_napi_add() was renamed to netif_napi_add_weight() in mainline
kernel. Call the old function instead.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/netdevice.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 1a0fc0eb..530cbb07 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -211,6 +211,17 @@ static inline int LINUX_BACKPORT(netif_rx)(struct sk_buff *skb)
 #define netif_rx LINUX_BACKPORT(netif_rx)
 #endif /* < 5.18.0 */
 
+#if LINUX_VERSION_IS_LESS(5,19,0)
+#define netif_napi_add_weight LINUX_BACKPORT(netif_napi_add_weight)
+static inline void netif_napi_add_weight(struct net_device *dev,
+				   struct napi_struct *napi,
+				   int (*poll)(struct napi_struct *, int),
+				   int weight)
+{
+	netif_napi_add(dev, napi, poll, weight);
+}
+#endif /* < 5.19.0 */
+
 #if LINUX_VERSION_IS_LESS(6,1,0)
 static inline void backport_netif_napi_add(struct net_device *dev,
 					   struct napi_struct *napi,
-- 
2.45.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux