mt76: Enable NPU support for Airoha AN7581 SoC
authorLorenzo Bianconi <[email protected]>
Sun, 16 Nov 2025 14:17:32 +0000 (15:17 +0100)
committerChristian Marangi <[email protected]>
Wed, 19 Nov 2025 10:30:57 +0000 (11:30 +0100)
Airoha AN7581 SoC supports a Network Processor (NPU) to offload WiFi
traffic. Add the required bits to enable the support of it in the MT76
driver. This will be enabled by default if we are compiling for the
Airoha AN7581 SoC.

Signed-off-by: Lorenzo Bianconi <[email protected]>
[ improve commit title/description ]
Link: https://github.com/openwrt/openwrt/pull/20826
Signed-off-by: Christian Marangi <[email protected]>
package/kernel/mt76/Makefile

index b9c002dca773216f9db2eb1339702df759902c73..f525877fd7b49bc263b174d3bb64a744923572a3 100644 (file)
@@ -495,6 +495,12 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e
 endif
 ifdef CONFIG_PACKAGE_kmod-mt7996e
   PKG_MAKE_FLAGS += CONFIG_MT7996E=m
+  ifdef CONFIG_TARGET_airoha_an7581
+    PKG_MAKE_FLAGS += CONFIG_MT76_NPU=y
+    PKG_MAKE_FLAGS += CONFIG_MT7996_NPU=y
+    NOSTDINC_FLAGS += -DCONFIG_MT76_NPU
+    NOSTDINC_FLAGS += -DCONFIG_MT7996_NPU
+  endif
 endif
 ifdef CONFIG_PACKAGE_kmod-mt7925-common
   PKG_MAKE_FLAGS += CONFIG_MT7925_COMMON=m