laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
kernel 6.1 API change: netif_napi_add() uses weight==64 by default

Change-Id: I7e70659e43c930a4c220eaef29cfb4e8d7a6eb0d
---
M drivers/dahdi/voicebus/voicebus_net.c
M drivers/dahdi/wctc4xxp/base.c
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/dahdi/voicebus/voicebus_net.c b/drivers/dahdi/voicebus/voicebus_net.c
index c17627c..c621b89 100644
--- a/drivers/dahdi/voicebus/voicebus_net.c
+++ b/drivers/dahdi/voicebus/voicebus_net.c
@@ -202,7 +202,12 @@

netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
+ /* 64 is NAPI_POLL_WEIGHT, i.e. the default */
+ netif_napi_add(netdev, &vb->napi, vb_net_poll);
+#else
netif_napi_add(netdev, &vb->napi, vb_net_poll, 64);
+#endif

skb_queue_head_init(&vb->captured_packets);
res = register_netdev(netdev);
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 223bbbd..90c4efc 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -656,7 +656,12 @@
netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
+ /* 64 is NAPI_POLL_WEIGHT, i.e. the default */
+ netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll);
+#else
netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
+#endif

res = register_netdev(netdev);
if (res) {

To view, visit change 30384. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I7e70659e43c930a4c220eaef29cfb4e8d7a6eb0d
Gerrit-Change-Number: 30384
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged