On 10/9/2018 2:47 PM, Hans de Goede wrote:
Before this commit brcmf_fw_request_done would call brcmf_fw_request_next_item to load the next item, which on an error would call brcmf_fw_request_done, which if the error is recoverable (*) will then continue calling brcmf_fw_request_next_item for the next item again which on an error will call brcmf_fw_request_done again... This does not blow up because we only have a limited number of items so we never recurse too deep. But the recursion is still quite ugly and frankly is giving me a headache, so lets fix this. This commit fixes this by removing brcmf_fw_request_next_item and by making brcmf_fw_get_firmwares and brcmf_fw_request_done directly call firmware_request_nowait resp. firmware_request themselves. *) brcmf_fw_request_nvram_done fallback path succeeds or BRCMF_FW_REQF_OPTIONAL is set
Reviewed-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- .../broadcom/brcm80211/brcmfmac/firmware.c | 65 ++++++------------- 1 file changed, 19 insertions(+), 46 deletions(-)