Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wifi: brcmfmac: allow ISO3166 fallback for BCM4350
@ 2026-09-01 18:49 Vinícius Ramon Fontanela
  2026-09-14 20:03 ` Arend van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: Vinícius Ramon Fontanela @ 2026-09-01 18:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: arend.vanspriel, brcm80211, brcm80211-dev-list.pdl

From: Vinícius Ramon Fontanela <vfontanela@gmail.com>

BCM4350 devices using brcmfmac on x86/PCIe may have no platform-provided
country code map. In that case brcmf_translate_country_code() falls back
to ISO3166 codes only for chips accepted by
brmcf_use_iso3166_ccode_fallback(). BCM4350 is currently missing from
that list, despite the adjacent BCM4345 and BCM4356 being present.

Without a country_codes table, BCM4350 therefore returns -EINVAL from
brcmf_translate_country_code(). brcmf_cfg80211_reg_notifier() silently
returns at that point, so the firmware never receives the requested
country iovar. On a MacBookPro14,1 with BCM4350 PCI device 14e4:43a3,
this left the firmware unable to scan UNII-2e DFS channels 100-144 even
though cfg80211 exposed those channels as available.

Adding BCM4350 to the ISO3166 fallback fixes the issue. Tested on a 2017
13-inch MacBook Pro (MacBookPro14,1), Fedora 44, kernel 7.1.12, with an
AP on channel 116 (5580 MHz). Before the change the AP was absent from
scans; after the change it is detected and NetworkManager connects to it
normally.

Signed-off-by: Vinícius Ramon Fontanela <vfontanela@gmail.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 000000000000..000000000000 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -7948,6 +7948,7 @@ static bool
brmcf_use_iso3166_ccode_fallback(struct brcmf_pub *drvr)
 	switch (drvr->bus_if->chip) {
 	case BRCM_CC_43430_CHIP_ID:
 	case BRCM_CC_4345_CHIP_ID:
+	case BRCM_CC_4350_CHIP_ID:
 	case BRCM_CC_4356_CHIP_ID:
 	case BRCM_CC_43602_CHIP_ID:
 		return true;
-- 
2.51.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] wifi: brcmfmac: allow ISO3166 fallback for BCM4350
  2026-09-01 18:49 [PATCH] wifi: brcmfmac: allow ISO3166 fallback for BCM4350 Vinícius Ramon Fontanela
@ 2026-09-14 20:03 ` Arend van Spriel
  2026-09-15 17:43   ` [PATCH v2] " Vinícius Ramon Fontanela
  0 siblings, 1 reply; 4+ messages in thread
From: Arend van Spriel @ 2026-09-14 20:03 UTC (permalink / raw)
  To: Vinícius Ramon Fontanela
  Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl

On Tue, 1 Sep 2026 11:49:37 -0700, Vinícius Ramon Fontanela wrote:
> BCM4350 devices using brcmfmac on x86/PCIe may have no platform-provided
> country code map. In that case brcmf_translate_country_code() falls back
> to ISO3166 codes only for chips accepted by
> brmcf_use_iso3166_ccode_fallback(). BCM4350 is currently missing from
> that list, despite the adjacent BCM4345 and BCM4356 being present.
> 
> [...]
> 
> Signed-off-by: Vinícius Ramon Fontanela <vfontanela@gmail.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 +
>  1 file changed, 1 insertion(+)

The change itself looks good, but the patch was corrupted by line
wrapping and stray text, so git am fails to apply it:

error: git diff header lacks filename information when removing 1 leading pathname component

Please resubmit a v2 using `git send-email` to avoid line wrapping.

Regards,
Arend

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] wifi: brcmfmac: allow ISO3166 fallback for BCM4350
  2026-09-14 20:03 ` Arend van Spriel
@ 2026-09-15 17:43   ` Vinícius Ramon Fontanela
  2026-10-04  9:45     ` Arend van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: Vinícius Ramon Fontanela @ 2026-09-15 17:43 UTC (permalink / raw)
  To: linux-wireless
  Cc: arend.vanspriel, brcm80211, brcm80211-dev-list.pdl,
	Vinícius Ramon Fontanela

BCM4350 devices using brcmfmac on x86/PCIe may have no platform-provided
country code map. In that case brcmf_translate_country_code() falls back to
ISO3166 codes only for chips accepted by
brmcf_use_iso3166_ccode_fallback().

BCM4350 is currently missing from that list, despite the adjacent BCM4345
and BCM4356 being present. Add BCM4350 so these devices can use the ISO3166
country code with revision 0.

Signed-off-by: Vinícius Ramon Fontanela <vfontanela@gmail.com>
---
v2: resend using git send-email to avoid line wrapping/corruption in v1.

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 9d8ce7bb0..2b819dbe6 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -8076,6 +8076,7 @@ static bool brmcf_use_iso3166_ccode_fallback(struct brcmf_pub *drvr)
 	switch (drvr->bus_if->chip) {
 	case BRCM_CC_43430_CHIP_ID:
 	case BRCM_CC_4345_CHIP_ID:
+	case BRCM_CC_4350_CHIP_ID:
 	case BRCM_CC_4356_CHIP_ID:
 	case BRCM_CC_43602_CHIP_ID:
 		return true;
-- 
2.55.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] wifi: brcmfmac: allow ISO3166 fallback for BCM4350
  2026-09-15 17:43   ` [PATCH v2] " Vinícius Ramon Fontanela
@ 2026-10-04  9:45     ` Arend van Spriel
  0 siblings, 0 replies; 4+ messages in thread
From: Arend van Spriel @ 2026-10-04  9:45 UTC (permalink / raw)
  To: Vinícius Ramon Fontanela
  Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl,
	Arend van Spriel

On Tue, 15 Sep 2026 14:43:00 -0300, Vinícius Ramon Fontanela wrote:
> BCM4350 devices using brcmfmac on x86/PCIe may have no platform-provided
> country code map. In that case brcmf_translate_country_code() falls back to
> ISO3166 codes only for chips accepted by
> brmcf_use_iso3166_ccode_fallback().
> 
> BCM4350 is currently missing from that list, despite the adjacent BCM4345
> and BCM4356 being present. Add BCM4350 so these devices can use the ISO3166
> country code with revision 0.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

> Signed-off-by: Vinícius Ramon Fontanela <vfontanela@gmail.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 +
>  1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-04  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 18:49 [PATCH] wifi: brcmfmac: allow ISO3166 fallback for BCM4350 Vinícius Ramon Fontanela
2026-09-14 20:03 ` Arend van Spriel
2026-09-15 17:43   ` [PATCH v2] " Vinícius Ramon Fontanela
2026-10-04  9:45     ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox