* [PATCH] wifi: brcmfmac: pcie: Make antenna SKU check optional for Apple boards with BCM4364/3
@ 2026-11-11 14:17 Aditya Garg
0 siblings, 0 replies; only message in thread
From: Aditya Garg @ 2026-11-11 14:17 UTC (permalink / raw)
To: Arend van Spriel, Johannes Berg
Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl, linux-kernel,
Andre Eikmeyer
On iMacPro1,1, iMac19,1 and iMac19,2, the Antenna SKU property required
for firmware selection is not advertised by ACPI. It has been found that
the firmware shipped by macOS for the BCM4364/3 chip is independent of
the Antenna SKU property by comparing SHA256 sums. Thus, for this chip,
make its requirement optional and use it only if ACPI advertises it.
Signed-off-by: Aditya Garg <aditya.garg@linux.dev>
---
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -2428,39 +2428,54 @@
fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1;
fwreq->bus_nr = devinfo->pdev->bus->number;
- /* Apple platforms with fancy firmware/NVRAM selection */
+ /* Apple platforms with fancy firmware/NVRAM selection.
+ * Antenna SKU is not advertised by ACPI in iMacPro1,1,
+ * iMac19,1 and iMac19,2. Since they use BCM4364/3, and
+ * the firmware for that chip doesn't depend on antenna-sku,
+ * make its check optional on that chip.
+ */
if (devinfo->settings->board_type &&
- devinfo->settings->antenna_sku &&
+ (devinfo->settings->antenna_sku ||
+ (devinfo->ci->chip == BRCM_CC_4364_CHIP_ID &&
+ devinfo->ci->chiprev == 3)) &&
devinfo->otp.valid) {
const struct brcmf_otp_params *otp = &devinfo->otp;
struct device *dev = &devinfo->pdev->dev;
const char **bt = fwreq->board_types;
+ int i = 0;
+ int j;
brcmf_dbg(PCIE, "Apple board: %s\n",
devinfo->settings->board_type);
/* Example: apple,shikoku-RASP-m-6.11-X3 */
- bt[0] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s-%s-%s",
- devinfo->settings->board_type,
- otp->module, otp->vendor, otp->version,
- devinfo->settings->antenna_sku);
- bt[1] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s-%s",
- devinfo->settings->board_type,
- otp->module, otp->vendor, otp->version);
- bt[2] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s",
- devinfo->settings->board_type,
- otp->module, otp->vendor);
- bt[3] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s",
- devinfo->settings->board_type,
- otp->module);
- bt[4] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s",
- devinfo->settings->board_type,
- devinfo->settings->antenna_sku);
- bt[5] = devinfo->settings->board_type;
+ if (devinfo->settings->antenna_sku)
+ bt[i++] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s-%s-%s",
+ devinfo->settings->board_type,
+ otp->module, otp->vendor, otp->version,
+ devinfo->settings->antenna_sku);
+ else
+ brcmf_dbg(PCIE, "Antenna SKU not found\n");
+ bt[i++] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s-%s",
+ devinfo->settings->board_type,
+ otp->module, otp->vendor, otp->version);
+ bt[i++] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s-%s",
+ devinfo->settings->board_type,
+ otp->module, otp->vendor);
+ bt[i++] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s",
+ devinfo->settings->board_type,
+ otp->module);
+ if (devinfo->settings->antenna_sku)
+ bt[i++] = devm_kasprintf(dev, GFP_KERNEL, "%s-%s",
+ devinfo->settings->board_type,
+ devinfo->settings->antenna_sku);
+ bt[i++] = devinfo->settings->board_type;
- if (!bt[0] || !bt[1] || !bt[2] || !bt[3] || !bt[4]) {
- kfree(fwreq);
- return NULL;
+ for (j = 0; j < i - 1; j++) {
+ if (!bt[j]) {
+ kfree(fwreq);
+ return NULL;
+ }
}
} else {
brcmf_dbg(PCIE, "Board: %s\n", devinfo->settings->board_type);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-11 14:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 14:17 [PATCH] wifi: brcmfmac: pcie: Make antenna SKU check optional for Apple boards with BCM4364/3 Aditya Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®