mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
When CONFIG_LEDS_CLASS is disabled, or it is a loadable module while
mt76 is built-in, we run into a link error:
drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_register_device':
mac80211.c:(.text+0xb78): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_of_led_classdev_register'
We don't really need a hard dependency here as the driver can presumably
work just fine without LEDs, so this follows the iwlwifi example and
adds a separate Kconfig option for the LED support, this will be available
whenever it will link, and otherwise the respective code gets left out from
the driver object.
Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
22 lines
663 B
Makefile
22 lines
663 B
Makefile
EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
|
|
|
|
obj-m := mt76.o
|
|
obj-$(CONFIG_MT7603E) += mt7603/
|
|
obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o
|
|
obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o
|
|
obj-$(CONFIG_MT76_USB) += mt76-usb.o
|
|
obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
|
|
obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
|
|
|
|
mt76-y := \
|
|
mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o tx.o agg-rx.o
|
|
|
|
mt76-usb-y := usb.o usb_trace.o usb_mcu.o
|
|
|
|
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-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o
|