Skip to content

Commit

Permalink
brcmfmac: Use separate struct to declare firmware names for Apple OTP…
Browse files Browse the repository at this point in the history
… chips

Commit 'dce45ded7619' added support for 89459 chip pcie device. It uses the
BRCM4355 chip which is also found in Apple hardware. However this commit
causes conflicts in the firmware naming between Apple hardware, which
supports OTP and other non-Apple hardwares. So, this patch makes these
Apple chips use their own firmware table so as to avoid possible conflicts
like these in the future.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
  • Loading branch information
AdityaGarg8 authored and intel-lab-lkp committed Jan 2, 2023
1 parent 44bacbd commit 592cb75
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = {
BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C),
BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C),
BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371),
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* revision ID 3 */
BRCMF_FW_ENTRY(CY_CC_89459_CHIP_ID, 0xFFFFFFFF, 4355),
};

static const struct brcmf_firmware_mapping brcmf_pcie_otp_fwnames[] = {
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* revision ID 3 */
};

#define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */

#define BRCMF_PCIE_REG_MAP_SIZE (32 * 1024)
Expand Down Expand Up @@ -2165,10 +2168,16 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo)
{ ".clm_blob", devinfo->clm_name },
};

fwreq = brcmf_fw_alloc_request(devinfo->ci->chip, devinfo->ci->chiprev,
brcmf_pcie_fwnames,
ARRAY_SIZE(brcmf_pcie_fwnames),
fwnames, ARRAY_SIZE(fwnames));
if (devinfo->otp.valid)
fwreq = brcmf_fw_alloc_request(devinfo->ci->chip, devinfo->ci->chiprev,
brcmf_pcie_otp_fwnames,
ARRAY_SIZE(brcmf_pcie_otp_fwnames),
fwnames, ARRAY_SIZE(fwnames));
else
fwreq = brcmf_fw_alloc_request(devinfo->ci->chip, devinfo->ci->chiprev,
brcmf_pcie_fwnames,
ARRAY_SIZE(brcmf_pcie_fwnames),
fwnames, ARRAY_SIZE(fwnames));
if (!fwreq)
return NULL;

Expand Down

0 comments on commit 592cb75

Please sign in to comment.