Skip to contentSkip to conversation

wifi: ath11k_pci: add a soft dependency on qrtr-mhi

PATCH In review Christoph Hellwig 5 participants 6 messages Dec 2, 2022 – Jul 23, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: ath11k_pci: add a soft dependency on qrtr-mhi

While ath11k_pci can load without qrtr-mhi, probing the actual hardware will fail when qrtr and qrtr-mhi aren't loaded with

failed to initialize qmi handle: -517

Add a MODULE_SOFTDEP statement to bring the module in (and as a hint for kernel packaging) for those cases where it isn't autoloaded already for some reason.

---
 drivers/net/wireless/ath/ath11k/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/pci.c +2 -0
index 99cf3357c66e16..9d58856cbf8a94 100644
@@ -1037,6 +1037,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");
 
+MODULE_SOFTDEP("pre: qrtr-mhi");
+
 /* QCA639x 2.0 firmware files */
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_BOARD_API2_FILE);
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_AMSS_FILE);
Signature · 7 lines
2.30.2


-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw

Hallo Christoph,

Christoph Hellwig <[email protected]> (2022-12-02):

Quoted 8 lines

While ath11k_pci can load without qrtr-mhi, probing the actual hardware will fail when qrtr and qrtr-mhi aren't loaded with

failed to initialize qmi handle: -517

Add a MODULE_SOFTDEP statement to bring the module in (and as a hint for kernel packaging) for those cases where it isn't autoloaded already for some reason.

That's indeed a very helpful hint, which helped us fix support for this module in a Debian Installer context (where we don't ship each and every module built in the linux-image package, but some limited selection).

https://salsa.debian.org/kernel-team/linux/-/merge_requests/667

Cheers,

Signature · 2 lines
Cyril Brulebois ([email protected])            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
#2 lore raw
In reply to Christoph Hellwig
Quoted 19 lines · Christoph Hellwig

While ath11k_pci can load without qrtr-mhi, probing the actual hardware will fail when qrtr and qrtr-mhi aren't loaded with

failed to initialize qmi handle: -517

Add a MODULE_SOFTDEP statement to bring the module in (and as a hint for kernel packaging) for those cases where it isn't autoloaded already for some reason.

---
 drivers/net/wireless/ath/ath11k/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 99cf3357c66e16..9d58856cbf8a94 100644

drivers/net/wireless/ath/ath11k/pci.c module_exit(ath11k_pci_exit); · line 1044

Quoted 8 lines
drivers/net/wireless/ath/ath11k/pci.c +2 -0
@@ -1037,6 +1037,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");
 
+MODULE_SOFTDEP("pre: qrtr-mhi");
+
 /* QCA639x 2.0 firmware files */
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_BOARD_API2_FILE);
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_AMSS_FILE);

Do we know why this patch is rejected?

#3 lore raw
Quoted 25 lines · Baochen Qiang
Quoted 22 lines · Christoph Hellwig

While ath11k_pci can load without qrtr-mhi, probing the actual hardware will fail when qrtr and qrtr-mhi aren't loaded with

failed to initialize qmi handle: -517

Add a MODULE_SOFTDEP statement to bring the module in (and as a hint for kernel packaging) for those cases where it isn't autoloaded already for some reason.

---
 drivers/net/wireless/ath/ath11k/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 99cf3357c66e16..9d58856cbf8a94 100644
@@ -1037,6 +1037,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");
 
Quoted 7 lines

drivers/net/wireless/ath/ath11k/pci.c module_exit(ath11k_pci_exit); · line 1044

Quoted 5 lines
drivers/net/wireless/ath/ath11k/pci.c +2 -0
+MODULE_SOFTDEP("pre: qrtr-mhi");
+
 /* QCA639x 2.0 firmware files */
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_BOARD_API2_FILE);
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_AMSS_FILE);

Do we know why this patch is rejected?

This predates me becoming a maintainer, and I don't see any comment from Kalle to the patch, however he did have the following comment in a separate thread where the issue was being discussed:
https://lore.kernel.org/all/[email protected]/

Quoted 12 lines

Though I am happy to take your MODULE_SOFTDEP() patch, just wondering if there is a better way to solve this. For example net/mac80211 (the 802.11 stack) has a lot of crypto dependencies:

select CRYPTO
select CRYPTO_LIB_ARC4
select CRYPTO_AES
select CRYPTO_CCM
select CRYPTO_GCM
select CRYPTO_CMAC
select CRC32

Quoted 1 line

And it's not using MODULE_SOFTDEP() at all.

So I'm guessing he considered this to be an issue that should be solved external to the individual drivers.

/jeff

#4 lore raw
Quoted 18 lines · Jeff Johnson

This predates me becoming a maintainer, and I don't see any comment from Kalle to the patch, however he did have the following comment in a separate thread where the issue was being discussed:
https://lore.kernel.org/all/[email protected]/

Quoted 12 lines

Though I am happy to take your MODULE_SOFTDEP() patch, just wondering if there is a better way to solve this. For example net/mac80211 (the 802.11 stack) has a lot of crypto dependencies:

select CRYPTO
select CRYPTO_LIB_ARC4
select CRYPTO_AES
select CRYPTO_CCM
select CRYPTO_GCM
select CRYPTO_CMAC
select CRC32

Quoted 4 lines
Quoted 1 line

And it's not using MODULE_SOFTDEP() at all.

So I'm guessing he considered this to be an issue that should be solved external to the individual drivers.

I just happened to see this and never saw the other discussion from Dec 2022, but it's somewhat interesting ... for some of those modules mac80211 has a hard dependency (such as lib_arc3, crc32) but for the other crypto modules it instantiates the algorithms via the string descriptions (such as "gcm(aes)") so it has no hard dependency.

Maybe crypto modules are treated specially by installers and the like?

johannes

#5 lore raw
In reply to Jeff Johnson
Quoted 51 lines · Jeff Johnson
Quoted 25 lines · Baochen Qiang
Quoted 22 lines · Christoph Hellwig

While ath11k_pci can load without qrtr-mhi, probing the actual hardware will fail when qrtr and qrtr-mhi aren't loaded with

failed to initialize qmi handle: -517

Add a MODULE_SOFTDEP statement to bring the module in (and as a hint for kernel packaging) for those cases where it isn't autoloaded already for some reason.

---
 drivers/net/wireless/ath/ath11k/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 99cf3357c66e16..9d58856cbf8a94 100644
@@ -1037,6 +1037,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");
 
Quoted 7 lines

drivers/net/wireless/ath/ath11k/pci.c module_exit(ath11k_pci_exit); · line 1044

Quoted 5 lines
drivers/net/wireless/ath/ath11k/pci.c +2 -0
+MODULE_SOFTDEP("pre: qrtr-mhi");
+
 /* QCA639x 2.0 firmware files */
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_BOARD_API2_FILE);
 MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_AMSS_FILE);

Do we know why this patch is rejected?

This predates me becoming a maintainer, and I don't see any comment from Kalle to the patch, however he did have the following comment in a separate thread where the issue was being discussed:
https://lore.kernel.org/all/[email protected]/

Quoted 12 lines

Though I am happy to take your MODULE_SOFTDEP() patch, just wondering if there is a better way to solve this. For example net/mac80211 (the 802.11 stack) has a lot of crypto dependencies:

select CRYPTO
select CRYPTO_LIB_ARC4
select CRYPTO_AES
select CRYPTO_CCM
select CRYPTO_GCM
select CRYPTO_CMAC
select CRC32

Quoted 5 lines
Quoted 1 line

And it's not using MODULE_SOFTDEP() at all.

So I'm guessing he considered this to be an issue that should be solved external to the individual drivers.

Thanks for finding the thread, it really helps.

Hmm, I agree that we should not blame this on the driver as all dependencies have been clearly documented in the Kconfig file. However seems the userspace tool (e.g. depmod on Ubuntu) does not care about it but just looks into ko files under /lib/modules. So if we currently does not have a better solution, maybe we can take the MODULE_SOFTDEP way?

Quoted 1 line

/jeff