mt76: sort out MODULE_DEPEND for PCI and USB

It is not enough to depend on mt76_core which then depends on linuxkpi
and linuxkpi_wlan.  Given each mt76 driver is its own module, each
also needs to depend on these linuxkpi modules.
In addition the core module usb part also has to depend on linuxkpi_usb.

This in addition to the previously sorted PCI drivers, allows (or will
allow) the individual chipsets (drivers) to load on systems with USB,
if compiled in, as well.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb
2026-02-02 01:24:07 +00:00
parent 03f6b1fd6a
commit b129f79a89
8 changed files with 22 additions and 5 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ MODULE_FIRMWARE(MT7663_FIRMWARE_N9);
MODULE_FIRMWARE(MT7663_ROM_PATCH);
#if defined(__FreeBSD__)
MODULE_VERSION(mt7615_pci, 1);
MODULE_DEPEND(mt7615_pci, mt76_core, 1, 1, 1);
MODULE_DEPEND(mt7615_pci, linuxkpi, 1, 1, 1);
MODULE_DEPEND(mt7615_pci, linuxkpi_wlan, 1, 1, 1);
MODULE_DEPEND(mt7615_pci, mt76_core, 1, 1, 1);
#endif
+1 -1
View File
@@ -266,7 +266,7 @@ MODULE_FIRMWARE(MT7916_FIRMWARE_WM);
MODULE_FIRMWARE(MT7916_ROM_PATCH);
#if defined(__FreeBSD__)
MODULE_VERSION(mt7915_pci, 1);
MODULE_DEPEND(mt7915_pci, mt76_core, 1, 1, 1);
MODULE_DEPEND(mt7915_pci, linuxkpi, 1, 1, 1);
MODULE_DEPEND(mt7915_pci, linuxkpi_wlan, 1, 1, 1);
MODULE_DEPEND(mt7915_pci, mt76_core, 1, 1, 1);
#endif
+1 -1
View File
@@ -595,7 +595,7 @@ MODULE_DESCRIPTION("MediaTek MT7921E (PCIe) wireless driver");
MODULE_LICENSE("Dual BSD/GPL");
#if defined(__FreeBSD__)
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);
MODULE_DEPEND(mt7921_pci, mt76_core, 1, 1, 1);
#endif
@@ -346,3 +346,10 @@ module_usb_driver(mt7921u_driver);
MODULE_DESCRIPTION("MediaTek MT7921U (USB) wireless driver");
MODULE_AUTHOR("Lorenzo Bianconi <lorenzo@kernel.org>");
MODULE_LICENSE("Dual BSD/GPL");
#if defined(__FreeBSD__)
MODULE_VERSION(mt7921_usb, 1);
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);
#endif
+1 -1
View File
@@ -651,7 +651,7 @@ MODULE_DESCRIPTION("MediaTek MT7925E (PCIe) wireless driver");
MODULE_LICENSE("Dual BSD/GPL");
#if defined(__FreeBSD__)
MODULE_VERSION(mt7925_pci, 1);
MODULE_DEPEND(mt7925_pci, mt76_core, 1, 1, 1);
MODULE_DEPEND(mt7925_pci, linuxkpi, 1, 1, 1);
MODULE_DEPEND(mt7925_pci, linuxkpi_wlan, 1, 1, 1);
MODULE_DEPEND(mt7925_pci, mt76_core, 1, 1, 1);
#endif
@@ -344,3 +344,10 @@ module_usb_driver(mt7925u_driver);
MODULE_AUTHOR("Lorenzo Bianconi <lorenzo@kernel.org>");
MODULE_DESCRIPTION("MediaTek MT7925U (USB) wireless driver");
MODULE_LICENSE("Dual BSD/GPL");
#if defined(__FreeBSD__)
MODULE_VERSION(mt7925_usb, 1);
MODULE_DEPEND(mt7925_usb, mt76_core, 1, 1, 1);
MODULE_DEPEND(mt7925_usb, linuxkpi, 1, 1, 1);
MODULE_DEPEND(mt7925_usb, linuxkpi_wlan, 1, 1, 1);
MODULE_DEPEND(mt7925_usb, linuxkpi_usb, 1, 1, 1);
#endif
+1 -1
View File
@@ -287,7 +287,7 @@ MODULE_FIRMWARE(MT7990_FIRMWARE_WM);
MODULE_FIRMWARE(MT7990_ROM_PATCH);
#if defined(__FreeBSD__)
MODULE_VERSION(mt7996_pci, 1);
MODULE_DEPEND(mt7996_pci, mt76_core, 1, 1, 1);
MODULE_DEPEND(mt7996_pci, linuxkpi, 1, 1, 1);
MODULE_DEPEND(mt7996_pci, linuxkpi_wlan, 1, 1, 1);
MODULE_DEPEND(mt7996_pci, mt76_core, 1, 1, 1);
#endif
+3
View File
@@ -1141,3 +1141,6 @@ EXPORT_SYMBOL_GPL(mt76u_init);
MODULE_AUTHOR("Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>");
MODULE_DESCRIPTION("MediaTek MT76x USB helpers");
MODULE_LICENSE("Dual BSD/GPL");
#if defined(__FreeBSD__)
MODULE_DEPEND(mt76_core, linuxkpi_usb, 1, 1, 1);
#endif