From: Julius Bairaktaris Date: Mon, 13 Jul 2026 13:47:39 +0000 (+0200) Subject: qualcommax: qca-edma: support the kernel 6.18 threaded NAPI API X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83369ca112580e5da7d1d111e706e5efe246f68a;p=thirdparty%2Fopenwrt.git qualcommax: qca-edma: support the kernel 6.18 threaded NAPI API dev_set_threaded() takes an enum netdev_napi_threaded on 6.18; it was a bool before. Select the argument on LINUX_VERSION_CODE so the driver keeps building on the 6.12 main kernel and on the 6.18 testing kernel. Without this, the 6.18 testing-kernel build fails with -Werror=enum-conversion on the threaded-NAPI enable added in commit 98108710b6 ("qualcommax: qca-edma: enable threaded NAPI by default"). Signed-off-by: Julius Bairaktaris Link: https://github.com/openwrt/openwrt/pull/24031 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c b/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c index a1b6b4ebffc..9bfa9e867ba 100644 --- a/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c +++ b/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "qca_edma.h" static void edma_irq_disable_all(struct edma_priv *priv) @@ -1191,7 +1192,11 @@ static int edma_probe(struct platform_device *pdev) goto err_irq; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 18, 0) + ret = dev_set_threaded(netdev, NETDEV_NAPI_THREADED_ENABLED); +#else ret = dev_set_threaded(netdev, true); +#endif if (ret) dev_warn(dev, "failed to enable threaded NAPI: %d\n", ret);