git: ea8db6b6d98c - stable/15 - mt76: further adjust debugfs compile time options

Bjoern A. Zeeb <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a66a20c.26da6.320baf6d__31903.5982874752$1785111436$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=ea8db6b6d98c5ebfb3c340ca78f96beceb2ac269

commit ea8db6b6d98c5ebfb3c340ca78f96beceb2ac269
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2026-07-11 13:40:29 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2026-07-26 16:49:16 +0000

    mt76: further adjust debugfs compile time options
    
    The debugfs options between the various modules (core and chipsets)
    are not 100% de-coupled.  This means we may run into unresolveable
    symbols at load time of the modules if we enable certain options
    generally or for core but not for the chipset.
    For now: always build the core module with debugfs support.
    Migrate the CONFIG_MAC80211_DEBUGFS flag into the Makefile of each
    chipset so we can individually turn it on.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit ec17c2454bf03f954e460bfe3c95e35f638ba71e)
---
 sys/modules/mt76/Makefile.inc    | 5 -----
 sys/modules/mt76/core/Makefile   | 3 +++
 sys/modules/mt76/mt7615/Makefile | 1 +
 sys/modules/mt76/mt7915/Makefile | 1 +
 sys/modules/mt76/mt7921/Makefile | 1 +
 sys/modules/mt76/mt7925/Makefile | 1 +
 sys/modules/mt76/mt7996/Makefile | 1 +
 7 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc
index 72fcacab15cd..27151f99087a 100644
--- a/sys/modules/mt76/Makefile.inc
+++ b/sys/modules/mt76/Makefile.inc
@@ -14,7 +14,6 @@ MT76_USB=		0
 # General options for common code so drivers can check.
 MT76_ACPI?=		0
 MT76_CONFIG_PM?=	0
-MT76_DEBUGFS?=		1
 MT76_SOC_WED?=		0
 
 # Other
@@ -28,10 +27,6 @@ CFLAGS+=	-DCONFIG_ARCH_DMA_ADDR_T_64BIT
 CFLAGS+=	-DCONFIG_PM
 .endif
 
-.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0
-CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
-.endif
-
 .if defined(MT76_SOC_WED) && ${MT76_SOC_WED} > 0
 CFLAGS+=	-DCONFIG_NET_MEDIATEK_SOC_WED
 .endif
diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile
index e4e65d8e3c24..59d34df86f70 100644
--- a/sys/modules/mt76/core/Makefile
+++ b/sys/modules/mt76/core/Makefile
@@ -6,6 +6,8 @@ KMOD=	${MT76_DRIVER_NAME}
 
 .PATH: ${COMMONDIR}
 
+MT76_DEBUGFS?=		1
+
 # Basic stuff.
 SRCS+=	mac80211.c mmio.c util.c dma.c  eeprom.c tx.c agg-rx.c mcu.c
 SRCS+=	channel.c scan.c wed.c
@@ -47,6 +49,7 @@ SRCS+=	mt792x_debugfs.c
 
 .if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0
 SRCS+=	debugfs.c
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 #SRCS+=	trace.c
diff --git a/sys/modules/mt76/mt7615/Makefile b/sys/modules/mt76/mt7615/Makefile
index 6eb650a8439a..345e7301d3a9 100644
--- a/sys/modules/mt76/mt7615/Makefile
+++ b/sys/modules/mt76/mt7615/Makefile
@@ -23,6 +23,7 @@ SRCS+=	dma.c mmio.c pci.c pci_init.c pci_mac.c
 .if defined(MT7615_DEBUGFS) && ${MT7615_DEBUGFS} > 0
 SRCS+=	debugfs.c
 CFLAGS+=	-DCONFIG_MT7915_DEBUGFS
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 .if defined(MT7615_DEV_COREDUMP) && ${MT7615_DEV_COREDUMP} > 0
diff --git a/sys/modules/mt76/mt7915/Makefile b/sys/modules/mt76/mt7915/Makefile
index 580fde3b7aa7..0fa7d9903344 100644
--- a/sys/modules/mt76/mt7915/Makefile
+++ b/sys/modules/mt76/mt7915/Makefile
@@ -27,6 +27,7 @@ CFLAGS+=	-DCONFIG_MT798X_WMAC
 .if defined(MT7915_DEBUGFS) && ${MT7915_DEBUGFS} > 0
 SRCS+=	debugfs.c
 CFLAGS+=	-DCONFIG_MT7915_DEBUGFS
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 .if defined(MT7915_DEV_COREDUMP) && ${MT7915_DEV_COREDUMP} > 0
diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile
index 2cf55ac506c6..d1def787144c 100644
--- a/sys/modules/mt76/mt7921/Makefile
+++ b/sys/modules/mt76/mt7921/Makefile
@@ -34,6 +34,7 @@ SRCS+=	usb.c
 .if defined(MT7921_DEBUGFS) && ${MT7921_DEBUGFS} > 0
 SRCS+=	debugfs.c
 CFLAGS+=	-DCONFIG_MT7921_DEBUGFS
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 .include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7925/Makefile b/sys/modules/mt76/mt7925/Makefile
index c8477eadd7f5..047dc9157bf8 100644
--- a/sys/modules/mt76/mt7925/Makefile
+++ b/sys/modules/mt76/mt7925/Makefile
@@ -27,6 +27,7 @@ SRCS+=	usb.c
 .if defined(MT7925_DEBUGFS) && ${MT7925_DEBUGFS} > 0
 SRCS+=	debugfs.c
 CFLAGS+=	-DCONFIG_MT7925_DEBUGFS
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 .include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7996/Makefile b/sys/modules/mt76/mt7996/Makefile
index 97de923c84ab..e66a9610d1dd 100644
--- a/sys/modules/mt76/mt7996/Makefile
+++ b/sys/modules/mt76/mt7996/Makefile
@@ -21,6 +21,7 @@ SRCS+=	pci.c dma.c
 .if defined(MT7996_DEBUGFS) && ${MT7996_DEBUGFS} > 0
 SRCS+=	debugfs.c
 CFLAGS+=	-DCONFIG_MT7996_DEBUGFS
+CFLAGS+=	-DCONFIG_MAC80211_DEBUGFS
 .endif
 
 .if defined(MT7996_DEV_COREDUMP) && ${MT7996_DEV_COREDUMP} > 0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.