Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: brcmfmac: silence warning for non-existent, optional firmware

The driver tries to load optional firmware files, specific to
the actual board compatible. These might not exist resulting in a warning
like this:
brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4373-sdio.tq,imx93-tqma9352-mba93xxla-mini.bin failed with error -2

Silence this by using firmware_request_nowait_nowarn() for all firmware
loads which use brcmf_fw_request_done_alt_path() as callback. This one
handles optional firmware files.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
[arend: use nowarn api for optional firmware files]
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20260328140121.2583606-1-arend.vanspriel@broadcom.com
[clean up code a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Alexander Stein and committed by
Johannes Berg
368f5098 1c161ca6

+11 -6
+11 -6
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
··· 670 670 } 671 671 672 672 fallback: 673 + if (cur->flags & BRCMF_FW_REQF_OPTIONAL) 674 + return firmware_request_nowarn(fw, cur->path, fwctx->dev); 675 + 673 676 return request_firmware(fw, cur->path, fwctx->dev); 674 677 } 675 678 ··· 717 714 if (!alt_path) 718 715 goto fallback; 719 716 720 - ret = request_firmware_nowait(THIS_MODULE, true, alt_path, 721 - fwctx->dev, GFP_KERNEL, fwctx, 722 - brcmf_fw_request_done_alt_path); 717 + ret = firmware_request_nowait_nowarn(THIS_MODULE, 718 + alt_path, fwctx->dev, 719 + GFP_KERNEL, fwctx, 720 + brcmf_fw_request_done_alt_path); 723 721 kfree(alt_path); 724 722 725 723 if (ret < 0) ··· 783 779 fwctx->req->board_types[0]); 784 780 if (alt_path) { 785 781 fwctx->board_index++; 786 - ret = request_firmware_nowait(THIS_MODULE, true, alt_path, 787 - fwctx->dev, GFP_KERNEL, fwctx, 788 - brcmf_fw_request_done_alt_path); 782 + ret = firmware_request_nowait_nowarn(THIS_MODULE, 783 + alt_path, fwctx->dev, 784 + GFP_KERNEL, fwctx, 785 + brcmf_fw_request_done_alt_path); 789 786 kfree(alt_path); 790 787 } else { 791 788 ret = request_firmware_nowait(THIS_MODULE, true, first->path,