]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
qualcommax: qca-edma: support the kernel 6.18 threaded NAPI API 24031/head
authorJulius Bairaktaris <julius@bairaktaris.de>
Mon, 13 Jul 2026 13:47:39 +0000 (15:47 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 27 Jul 2026 07:34:39 +0000 (09:34 +0200)
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 <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/24031
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c

index a1b6b4ebffcf272f83705bbec0f500b38c1bb8f7..9bfa9e867ba0d900c6c3a1926aeff66f8e609d7a 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
+#include <linux/version.h>
 #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);