Skip to contentSkip to conversation

wifi: mt76: mt7996: add NET_AIROHA dependency

PATCH New Arnd Bergmann 1 participant 1 message Sep 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mt76: mt7996: add NET_AIROHA dependency

From: Arnd Bergmann <[email protected]>

MT7996E fails to link as build-in when NET_AIROHA=m:

WARNING: unmet direct dependencies detected for MT76_NPU
Depends on [m]: NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_MEDIATEK [=y] && (NET_AIROHA_NPU [=y]=y [=y] || MT76_CORE [=y]=NET_AIROHA_NPU [=y]) && (NET_AIROHA [=m] || !NET_AIROHA [=m]) Selected by [y]:
- MT7996_NPU [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_MEDIATEK [=y] && MT7996E [=y] && (NET_AIROHA_NPU [=y]=y [=y] || MT76_CORE [=y]=NET_AIROHA_NPU [=y])
arm-linux-gnueabi-ld: drivers/net/wireless/mediatek/mt76/npu.o: in function `mt76_npu_init':
npu.c:(.text.mt76_npu_init+0x4c): undefined reference to `airoha_ppe_get_dev'
arm-linux-gnueabi-ld: npu.c:(.text.mt76_npu_init+0xf8): undefined reference to `airoha_ppe_put_dev'

Add another dependency to prevent this configuration, with an explicit special case to allow the NPU to be used while the PPE code is stubbed out with NET_AIROHA=n.

Fixes 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")

---
I am not sure what the use case is for using only the NPU but not the PPE code, and it would be good to add a comment near the dependency to clarify this, or possibly skip the complexity and just make it a hard dependency.

---
 drivers/net/wireless/mediatek/mt76/Kconfig        | 1 +
 drivers/net/wireless/mediatek/mt76/mt7996/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
index 2ca96e0527c0..a4ece38f938d 100644
@@ -40,6 +40,7 @@ config MT792x_USB
 config MT76_NPU
 	tristate
 	depends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU
+	depends on NET_AIROHA=y || NET_AIROHA=n || MT76_CORE=NET_AIROHA
 
 source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig"
 source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig"
drivers/net/wireless/mediatek/mt76/mt7996/Kconfig +1 -0
index 5742bce12fbb..3c51b402f44e 100644
@@ -17,5 +17,6 @@ config MT7996_NPU
 	bool "MT7996 (PCIe) NPU support"
 	depends on MT7996E
 	depends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU
+	depends on NET_AIROHA=y || NET_AIROHA=n || MT76_CORE=NET_AIROHA
 	select MT76_NPU
 	default n
Signature · 1 line
2.53.0