mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
wifi: mt76: fix airoha_npu dependency tracking
There is a new build failure with MT7996E=m MT76_CORE=y and NET_AIROHA_NPU=m:
ld.lld: error: undefined symbol: airoha_npu_get
ld.lld: error: undefined symbol: airoha_npu_put
>>> referenced by npu.c
>>> drivers/net/wireless/mediatek/mt76/npu.o:(mt76_npu_init) in archive vmlinux.a
Fix this by reworking the dependency for the MT7996_NPU to only
allow enabling that when mt76_core can link against the npu driver.
To make sure this gets caught more easily in the future when additional
mt76 variants need the same dependency, also turn CONFIG_MT76_NPU into
a tristate symbol that has the same dependency.
Fixes: 7fb554b1b6 ("wifi: mt76: Introduce the NPU generic layer")
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260612201519.4054683-1-arnd@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
7981aca2bd
commit
7cd57ff6c6
|
|
@ -38,8 +38,8 @@ config MT792x_USB
|
|||
select MT76_USB
|
||||
|
||||
config MT76_NPU
|
||||
bool
|
||||
depends on MT76_CORE
|
||||
tristate
|
||||
depends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU
|
||||
|
||||
source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig"
|
||||
source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,11 @@ mt76-y := \
|
|||
mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o \
|
||||
tx.o agg-rx.o mcu.o wed.o scan.o channel.o
|
||||
|
||||
mt76-$(CONFIG_MT76_NPU) += npu.o
|
||||
ifdef CONFIG_MT76_NPU
|
||||
# CONFIG_MT76_NPU is tristate to simplify dependency tracking,
|
||||
# but it behaves as a bool symbol here.
|
||||
mt76-y += npu.o
|
||||
endif
|
||||
mt76-$(CONFIG_PCI) += pci.o
|
||||
mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
||||
|
||||
|
|
|
|||
|
|
@ -1647,7 +1647,7 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *skb,
|
|||
int mt76_testmode_set_state(struct mt76_phy *phy, enum mt76_testmode_state state);
|
||||
int mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len);
|
||||
|
||||
#ifdef CONFIG_MT76_NPU
|
||||
#if IS_ENABLED(CONFIG_MT76_NPU)
|
||||
void mt76_npu_check_ppe(struct mt76_dev *dev, struct sk_buff *skb,
|
||||
u32 info);
|
||||
int mt76_npu_dma_add_buf(struct mt76_phy *phy, struct mt76_queue *q,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ config MT7996E
|
|||
config MT7996_NPU
|
||||
bool "MT7996 (PCIe) NPU support"
|
||||
depends on MT7996E
|
||||
depends on NET_AIROHA_NPU=y || MT7996E=NET_AIROHA_NPU
|
||||
depends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU
|
||||
select MT76_NPU
|
||||
default n
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user