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>
#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)
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);