mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
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>
53 lines
1.7 KiB
Makefile
53 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
obj-$(CONFIG_MT76_CORE) += mt76.o
|
|
obj-$(CONFIG_MT76_USB) += mt76-usb.o
|
|
obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o
|
|
obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o
|
|
obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o
|
|
obj-$(CONFIG_MT76_CONNAC_LIB) += mt76-connac-lib.o
|
|
obj-$(CONFIG_MT792x_LIB) += mt792x-lib.o
|
|
obj-$(CONFIG_MT792x_USB) += mt792x-usb.o
|
|
|
|
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
|
|
|
|
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
|
|
|
|
mt76-usb-y := usb.o usb_trace.o
|
|
mt76-sdio-y := sdio.o sdio_txrx.o
|
|
|
|
CFLAGS_trace.o := -I$(src)
|
|
CFLAGS_usb_trace.o := -I$(src)
|
|
CFLAGS_mt76x02_trace.o := -I$(src)
|
|
CFLAGS_mt792x_trace.o := -I$(src)
|
|
|
|
mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \
|
|
mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o \
|
|
mt76x02_txrx.o mt76x02_trace.o mt76x02_debugfs.o \
|
|
mt76x02_dfs.o mt76x02_beacon.o
|
|
|
|
mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o
|
|
|
|
mt76-connac-lib-y := mt76_connac_mcu.o mt76_connac_mac.o mt76_connac3_mac.o
|
|
|
|
mt792x-lib-y := mt792x_core.o mt792x_mac.o mt792x_trace.o \
|
|
mt792x_debugfs.o mt792x_dma.o
|
|
mt792x-lib-$(CONFIG_ACPI) += mt792x_acpi_sar.o
|
|
mt792x-usb-y := mt792x_usb.o
|
|
|
|
obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
|
|
obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
|
|
obj-$(CONFIG_MT7603E) += mt7603/
|
|
obj-$(CONFIG_MT7615_COMMON) += mt7615/
|
|
obj-$(CONFIG_MT7915E) += mt7915/
|
|
obj-$(CONFIG_MT7921_COMMON) += mt7921/
|
|
obj-$(CONFIG_MT7996E) += mt7996/
|
|
obj-$(CONFIG_MT7925_COMMON) += mt7925/
|