diff mbox series

brcmfmac: Add clm_blob firmware files to modinfo

Message ID 20210607103433.21022-1-matthias.bgg@kernel.org (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series brcmfmac: Add clm_blob firmware files to modinfo | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Matthias Brugger June 7, 2021, 10:34 a.m. UTC
From: Matthias Brugger <mbrugger@suse.com>

Cypress Wi-Fi chipsets include information regarding regulatory
constraints. These are provided to the driver through "Country Local
Matrix" (CLM) blobs. Files present in Linux firmware repository are
on a generic world-wide safe version with conservative power
settings which is designed to comply with regulatory but may not
provide best performance on all boards. Never the less, a better
functionality can be expected with the file present, so add it to the
modinfo of the driver.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

 .../wireless/broadcom/brcm80211/brcmfmac/firmware.h  |  7 +++++++
 .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c  |  4 ++--
 .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.c  | 12 ++++++------
 3 files changed, 15 insertions(+), 8 deletions(-)

Comments

Hans de Goede June 7, 2021, 3:33 p.m. UTC | #1
Hi,

On 6/7/21 12:34 PM, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
> 
> Cypress Wi-Fi chipsets include information regarding regulatory
> constraints. These are provided to the driver through "Country Local
> Matrix" (CLM) blobs. Files present in Linux firmware repository are
> on a generic world-wide safe version with conservative power
> settings which is designed to comply with regulatory but may not
> provide best performance on all boards. Never the less, a better
> functionality can be expected with the file present, so add it to the
> modinfo of the driver.
> 
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> 
> ---
> 
>  .../wireless/broadcom/brcm80211/brcmfmac/firmware.h  |  7 +++++++
>  .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c  |  4 ++--
>  .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.c  | 12 ++++++------
>  3 files changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
> index 46c66415b4a6..e290dec9c53d 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
> @@ -32,6 +32,13 @@ static const char BRCM_ ## fw_name ## _FIRMWARE_BASENAME[] = \
>  	BRCMF_FW_DEFAULT_PATH fw_base; \
>  MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".bin")
>  
> +/* Firmware and Country Local Matrix files */
> +#define BRCMF_FW_CLM_DEF(fw_name, fw_base) \
> +static const char BRCM_ ## fw_name ## _FIRMWARE_BASENAME[] = \
> +	BRCMF_FW_DEFAULT_PATH fw_base; \
> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".bin"); \
> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".clm_blob")
> +
>  #define BRCMF_FW_ENTRY(chipid, mask, name) \
>  	{ chipid, mask, BRCM_ ## name ## _FIRMWARE_BASENAME }
>  
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> index 143a705b5cb3..c49dd0c36ae4 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -48,8 +48,8 @@ enum brcmf_pcie_state {
>  BRCMF_FW_DEF(43602, "brcmfmac43602-pcie");
>  BRCMF_FW_DEF(4350, "brcmfmac4350-pcie");
>  BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie");
> -BRCMF_FW_DEF(4356, "brcmfmac4356-pcie");
> -BRCMF_FW_DEF(43570, "brcmfmac43570-pcie");
> +BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie");
> +BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie");
>  BRCMF_FW_DEF(4358, "brcmfmac4358-pcie");
>  BRCMF_FW_DEF(4359, "brcmfmac4359-pcie");
>  BRCMF_FW_DEF(4364, "brcmfmac4364-pcie");
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> index b8788d7090a4..69cbe38f05ce 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> @@ -616,14 +616,14 @@ BRCMF_FW_DEF(43362, "brcmfmac43362-sdio");
>  BRCMF_FW_DEF(4339, "brcmfmac4339-sdio");
>  BRCMF_FW_DEF(43430A0, "brcmfmac43430a0-sdio");
>  /* Note the names are not postfixed with a1 for backward compatibility */
> -BRCMF_FW_DEF(43430A1, "brcmfmac43430-sdio");
> -BRCMF_FW_DEF(43455, "brcmfmac43455-sdio");
> +BRCMF_FW_CLM_DEF(43430A1, "brcmfmac43430-sdio");
> +BRCMF_FW_CLM_DEF(43455, "brcmfmac43455-sdio");
>  BRCMF_FW_DEF(43456, "brcmfmac43456-sdio");
> -BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
> -BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
> +BRCMF_FW_CLM_DEF(4354, "brcmfmac4354-sdio");
> +BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-sdio");
>  BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
> -BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
> -BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
> +BRCMF_FW_CLM_DEF(4373, "brcmfmac4373-sdio");
> +BRCMF_FW_CLM_DEF(43012, "brcmfmac43012-sdio");
>  
>  /* firmware config files */
>  MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
>
Kalle Valo June 15, 2021, 10:38 a.m. UTC | #2
matthias.bgg@kernel.org wrote:

> From: Matthias Brugger <mbrugger@suse.com>
> 
> Cypress Wi-Fi chipsets include information regarding regulatory
> constraints. These are provided to the driver through "Country Local
> Matrix" (CLM) blobs. Files present in Linux firmware repository are
> on a generic world-wide safe version with conservative power
> settings which is designed to comply with regulatory but may not
> provide best performance on all boards. Never the less, a better
> functionality can be expected with the file present, so add it to the
> modinfo of the driver.
> 
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

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

885f256f61f9 brcmfmac: Add clm_blob firmware files to modinfo
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
index 46c66415b4a6..e290dec9c53d 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
@@ -32,6 +32,13 @@  static const char BRCM_ ## fw_name ## _FIRMWARE_BASENAME[] = \
 	BRCMF_FW_DEFAULT_PATH fw_base; \
 MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".bin")
 
+/* Firmware and Country Local Matrix files */
+#define BRCMF_FW_CLM_DEF(fw_name, fw_base) \
+static const char BRCM_ ## fw_name ## _FIRMWARE_BASENAME[] = \
+	BRCMF_FW_DEFAULT_PATH fw_base; \
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".bin"); \
+MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw_base ".clm_blob")
+
 #define BRCMF_FW_ENTRY(chipid, mask, name) \
 	{ chipid, mask, BRCM_ ## name ## _FIRMWARE_BASENAME }
 
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 143a705b5cb3..c49dd0c36ae4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -48,8 +48,8 @@  enum brcmf_pcie_state {
 BRCMF_FW_DEF(43602, "brcmfmac43602-pcie");
 BRCMF_FW_DEF(4350, "brcmfmac4350-pcie");
 BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie");
-BRCMF_FW_DEF(4356, "brcmfmac4356-pcie");
-BRCMF_FW_DEF(43570, "brcmfmac43570-pcie");
+BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie");
+BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie");
 BRCMF_FW_DEF(4358, "brcmfmac4358-pcie");
 BRCMF_FW_DEF(4359, "brcmfmac4359-pcie");
 BRCMF_FW_DEF(4364, "brcmfmac4364-pcie");
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index b8788d7090a4..69cbe38f05ce 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -616,14 +616,14 @@  BRCMF_FW_DEF(43362, "brcmfmac43362-sdio");
 BRCMF_FW_DEF(4339, "brcmfmac4339-sdio");
 BRCMF_FW_DEF(43430A0, "brcmfmac43430a0-sdio");
 /* Note the names are not postfixed with a1 for backward compatibility */
-BRCMF_FW_DEF(43430A1, "brcmfmac43430-sdio");
-BRCMF_FW_DEF(43455, "brcmfmac43455-sdio");
+BRCMF_FW_CLM_DEF(43430A1, "brcmfmac43430-sdio");
+BRCMF_FW_CLM_DEF(43455, "brcmfmac43455-sdio");
 BRCMF_FW_DEF(43456, "brcmfmac43456-sdio");
-BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
-BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
+BRCMF_FW_CLM_DEF(4354, "brcmfmac4354-sdio");
+BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-sdio");
 BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
-BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
-BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
+BRCMF_FW_CLM_DEF(4373, "brcmfmac4373-sdio");
+BRCMF_FW_CLM_DEF(43012, "brcmfmac43012-sdio");
 
 /* firmware config files */
 MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");