• Hans de Goede's avatar
    brcmfmac: Remove recursion from firmware load error handling · 5b587496
    Hans de Goede authored
    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
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    5b587496
firmware.c 16 KB