Skip to contentSkip to conversation

brcmfmac: expose firmware config files through modinfo

PATCH In review [email protected] 3 participants 3 messages Nov 24, 2020 – Dec 2, 2020

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

PATCH v3 1/1 brcmfmac: expose firmware config files through modinfo

From: Matthias Brugger <[email protected]>

Apart from a firmware binary the chip needs a config file used by the FW. Add the config files to modinfo so that they can be read by userspace.

---

Changes in v3:
Use only two more generic wildcards.

Changes in v2:
In comparison to first version [0] we use wildcards to enumerate the firmware configuration files. Wildcard support was added to dracut
recently [1].
[0] https://lore.kernel.org/linux-wireless/[email protected]/
[1] https://github.com/dracutdevs/dracut/pull/860

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +4 -0
index 99987a789e7e..6fe91c537adf 100644
@@ -625,6 +625,10 @@ BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
 BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
 BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
 
+/* firmware config files */
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcm/brcmfmac*-sdio.*.txt");
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcm/brcmfmac*-pcie.*.txt");
+
 static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
 	BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
 	BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
Signature · 1 line
2.29.2
Reviewed-by on v3 1/1
#1 lore raw

Hi,

Quoted 6 lines · On 11/24/20 1:00 PM, [email protected] wrote:

From: Matthias Brugger <[email protected]>

Apart from a firmware binary the chip needs a config file used by the FW. Add the config files to modinfo so that they can be read by userspace.

Quoted 6 lines

---

Changes in v3:
Use only two more generic wildcards.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 27 lines

Changes in v2:
In comparison to first version [0] we use wildcards to enumerate the firmware configuration files. Wildcard support was added to dracut
recently [1].
[0] https://lore.kernel.org/linux-wireless/[email protected]/
[1] https://github.com/dracutdevs/dracut/pull/860

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +4 -0
index 99987a789e7e..6fe91c537adf 100644
@@ -625,6 +625,10 @@ BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
 BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
 BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
 
+/* firmware config files */
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcm/brcmfmac*-sdio.*.txt");
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcm/brcmfmac*-pcie.*.txt");
+
 static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
 	BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
 	BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
#2 lore raw
In reply to [email protected]
Quoted 8 lines · [email protected] wrote:

From: Matthias Brugger <[email protected]>

Apart from a firmware binary the chip needs a config file used by the FW. Add the config files to modinfo so that they can be read by userspace.

Patch applied to wireless-drivers-next.git, thanks.

75729e110e68 brcmfmac: expose firmware config files through modinfo

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

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