diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-06-10 11:24:04 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-06-14 22:55:53 +0000 |
| commit | 134e90e01da181a6048f0ca3368e466818def1b3 (patch) | |
| tree | dc2fb99f239fe13a8107bb2a83639d3995c830c7 | |
| parent | b662295ecb620b8ebf00188a111ff16701b0375d (diff) | |
mt76: mt7921: depend on lindebugfs and turn debugfs support on
Add the missing MODULE_DEPEND() calls for lindebugfs.
It is unfortunate that they are shared code between various bus
implementations. Ideally we would leave the MODULE_DEPEND() calls
in the debugfs.c file instead of adding extra #ifdef guards to the
bus attachment files.
Turn debugfs support on for mt76(core) and the mt7921 module for now.
Sponsonred by: The FreeBSD Foundation
MFC after: 3 days
| -rw-r--r-- | sys/contrib/dev/mediatek/mt76/debugfs.c | 3 | ||||
| -rw-r--r-- | sys/contrib/dev/mediatek/mt76/mt7921/pci.c | 3 | ||||
| -rw-r--r-- | sys/contrib/dev/mediatek/mt76/mt7921/usb.c | 3 | ||||
| -rw-r--r-- | sys/modules/mt76/Makefile.inc | 2 | ||||
| -rw-r--r-- | sys/modules/mt76/mt7921/Makefile | 2 |
5 files changed, 11 insertions, 2 deletions
diff --git a/sys/contrib/dev/mediatek/mt76/debugfs.c b/sys/contrib/dev/mediatek/mt76/debugfs.c index a5ac6ca86735..344ccdc98293 100644 --- a/sys/contrib/dev/mediatek/mt76/debugfs.c +++ b/sys/contrib/dev/mediatek/mt76/debugfs.c @@ -124,3 +124,6 @@ mt76_register_debugfs_fops(struct mt76_phy *phy, return dir; } EXPORT_SYMBOL_GPL(mt76_register_debugfs_fops); +#if defined(__FreeBSD__) +MODULE_DEPEND(mt76_core, lindebugfs, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7921/pci.c b/sys/contrib/dev/mediatek/mt76/mt7921/pci.c index b70335aba6bf..901a10986e58 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7921/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7921/pci.c @@ -609,4 +609,7 @@ MODULE_VERSION(mt7921_pci, 1); MODULE_DEPEND(mt7921_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7921_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7921_pci, linuxkpi_wlan, 1, 1, 1); +#if defined(CONFIG_MT7921_DEBUGFS) +MODULE_DEPEND(mt7921_pci, lindebugfs, 1, 1, 1); +#endif #endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7921/usb.c b/sys/contrib/dev/mediatek/mt76/mt7921/usb.c index 64881ef7cbf4..a02dd21ef557 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7921/usb.c +++ b/sys/contrib/dev/mediatek/mt76/mt7921/usb.c @@ -352,4 +352,7 @@ MODULE_DEPEND(mt7921_usb, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7921_usb, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7921_usb, linuxkpi_wlan, 1, 1, 1); MODULE_DEPEND(mt7921_usb, linuxkpi_usb, 1, 1, 1); +#if defined(CONFIG_MT7921_DEBUGFS) +MODULE_DEPEND(mt7921_usb, lindebugfs, 1, 1, 1); +#endif #endif diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index 5aa19fe183af..72fcacab15cd 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -14,7 +14,7 @@ MT76_USB= 0 # General options for common code so drivers can check. MT76_ACPI?= 0 MT76_CONFIG_PM?= 0 -MT76_DEBUGFS?= 0 +MT76_DEBUGFS?= 1 MT76_SOC_WED?= 0 # Other diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile index b6dbe88204a3..2cf55ac506c6 100644 --- a/sys/modules/mt76/mt7921/Makefile +++ b/sys/modules/mt76/mt7921/Makefile @@ -8,7 +8,7 @@ MT7921_PCI= 1 MT7921_SDIO= 0 MT7921_USB= 0 -MT7921_DEBUGFS= 0 +MT7921_DEBUGFS= 1 # Common stuff. SRCS+= init.c main.c mac.c mcu.c |
