Skip to contentSkip to conversation

ath11k: pci: Add more MODULE_FIRMWARE() entries

PATCH In review Takashi Iwai 3 participants 5 messages Mar 30, 2023 – Apr 17, 2023

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

PATCH 1/1 ath11k: pci: Add more MODULE_FIRMWARE() entries

As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE.

While we are at it, use the wildcard instead of listing each firmware files individually for each.

---

I can rewrite without wildcards if it's preferred, too. But IMO this makes easier to maintain.

 drivers/net/wireless/ath/ath11k/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +5 -4
index 0aeef2948ff5..379f7946a29e 100644
@@ -1039,7 +1039,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");
 
-/* 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);
-MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_M3_FILE);
+/* firmware files */
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCN9074/hw1.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.1/*");
Signature · 1 line
2.35.3
#1 lore raw
Quoted 24 lines · Takashi Iwai

As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE.

While we are at it, use the wildcard instead of listing each firmware files individually for each.

---

I can rewrite without wildcards if it's preferred, too. But IMO this makes easier to maintain.

 drivers/net/wireless/ath/ath11k/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 0aeef2948ff5..379f7946a29e 100644
@@ -1039,7 +1039,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");

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

Quoted 10 lines
drivers/net/wireless/ath/ath11k/pci.c +5 -4
 
-/* 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);
-MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_M3_FILE);
+/* firmware files */
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCN9074/hw1.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.1/*");

I don't feel strongly about this.

But unless I'm mistaken the above does seem to pick up a number of files totalling around 25Mbytes. Perhaps that isn't ideal.

$ find ath11k/QC* ath11k/WCN6*
ath11k/QCA6390
ath11k/QCA6390/hw2.0
ath11k/QCA6390/hw2.0/board-2.bin
ath11k/QCA6390/hw2.0/Notice.txt
ath11k/QCA6390/hw2.0/amss.bin
ath11k/QCA6390/hw2.0/m3.bin
ath11k/QCN9074
ath11k/QCN9074/hw1.0
ath11k/QCN9074/hw1.0/board-2.bin
ath11k/QCN9074/hw1.0/Notice.txt
ath11k/QCN9074/hw1.0/amss.bin
ath11k/QCN9074/hw1.0/m3.bin
ath11k/WCN6750
ath11k/WCN6750/hw1.0
ath11k/WCN6750/hw1.0/wpss.b02
ath11k/WCN6750/hw1.0/wpss.b04
ath11k/WCN6750/hw1.0/wpss.b03
ath11k/WCN6750/hw1.0/board-2.bin
ath11k/WCN6750/hw1.0/wpss.b08
ath11k/WCN6750/hw1.0/wpss.b05
ath11k/WCN6750/hw1.0/Notice.txt
ath11k/WCN6750/hw1.0/wpss.b01
ath11k/WCN6750/hw1.0/wpss.b06
ath11k/WCN6750/hw1.0/wpss.b07
ath11k/WCN6750/hw1.0/wpss.b00
ath11k/WCN6750/hw1.0/wpss.mdt
ath11k/WCN6855
ath11k/WCN6855/hw2.0
ath11k/WCN6855/hw2.0/board-2.bin
ath11k/WCN6855/hw2.0/regdb.bin
ath11k/WCN6855/hw2.0/Notice.txt
ath11k/WCN6855/hw2.0/amss.bin
ath11k/WCN6855/hw2.0/m3.bin
$ du -sh ath11k/QC* ath11k/WCN6*
3,2M	ath11k/QCA6390
4,0M	ath11k/QCN9074
8,1M	ath11k/WCN6750
9,7M	ath11k/WCN6855
#2 lore raw
Quoted 39 lines · Simon Horman
Quoted 24 lines · Takashi Iwai

As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE.

While we are at it, use the wildcard instead of listing each firmware files individually for each.

---

I can rewrite without wildcards if it's preferred, too. But IMO this makes easier to maintain.

 drivers/net/wireless/ath/ath11k/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 0aeef2948ff5..379f7946a29e 100644
@@ -1039,7 +1039,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");

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

Quoted 10 lines
drivers/net/wireless/ath/ath11k/pci.c +5 -4
 
-/* 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);
-MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_M3_FILE);
+/* firmware files */
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCN9074/hw1.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.1/*");

I don't feel strongly about this.

Quoted 2 lines

But unless I'm mistaken the above does seem to pick up a number of files totalling around 25Mbytes. Perhaps that isn't ideal.

MODULE_FIRMWARE() itself is nothing but a hint for the required firmware files. The driver supports those models, hence it should list up the mandatory firmware files that *can* be used with it; without the firmware, the driver itself is just useless, as you know.

The rest -- how to reduce the actual sizes -- is above the kernel modinfo covers, and it depends on the system implementation, IMO. It can be somehow more selective, it can compress data, or it can load the stuff on demands.

thanks,

Takashi

Reviewed-by
#3 lore raw
Quoted 49 lines · Takashi Iwai
Quoted 39 lines · Simon Horman
Quoted 24 lines · Takashi Iwai

As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE.

While we are at it, use the wildcard instead of listing each firmware files individually for each.

---

I can rewrite without wildcards if it's preferred, too. But IMO this makes easier to maintain.

 drivers/net/wireless/ath/ath11k/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +0 -0
index 0aeef2948ff5..379f7946a29e 100644
@@ -1039,7 +1039,8 @@ module_exit(ath11k_pci_exit);
 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
 MODULE_LICENSE("Dual BSD/GPL");

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

Quoted 10 lines
drivers/net/wireless/ath/ath11k/pci.c +5 -4
 
-/* 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);
-MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/" ATH11K_M3_FILE);
+/* firmware files */
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCA6390/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/QCN9074/hw1.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.0/*");
+MODULE_FIRMWARE(ATH11K_FW_DIR "/WCN6855/hw2.1/*");

I don't feel strongly about this.

Quoted 2 lines

But unless I'm mistaken the above does seem to pick up a number of files totalling around 25Mbytes. Perhaps that isn't ideal.

MODULE_FIRMWARE() itself is nothing but a hint for the required firmware files. The driver supports those models, hence it should list up the mandatory firmware files that *can* be used with it; without the firmware, the driver itself is just useless, as you know.

Quoted 4 lines

The rest -- how to reduce the actual sizes -- is above the kernel modinfo covers, and it depends on the system implementation, IMO. It can be somehow more selective, it can compress data, or it can load the stuff on demands.

Thanks, understood.
If that is the case then I have no objections.

Signature · 3 lines
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#4 lore raw
In reply to Takashi Iwai
Quoted 11 lines · Takashi Iwai

As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE.

While we are at it, use the wildcard instead of listing each firmware files individually for each.

Patch applied to ath-next branch of ath.git, thanks.

06c584739692 wifi: ath11k: pci: Add more MODULE_FIRMWARE() entries

Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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