Re: [PATCH wireless] wifi: nxpwifi: fail the firmware download on a poll timeout
From: Johannes Berg
Date: Sat Oct 03 2026 - 15:28:01 EST
On Sat, 2026-10-03 at 21:22 +0200, Karl Mehltretter wrote:
> nxpwifi_sdio_poll_card_status() returns the result of the last register
> read when the requested status bits never show up. That read succeeded,
> so a timeout is reported as success.
>
> nxpwifi_prog_fw_w_helper() therefore skips its "poll status timeout"
> branch on a timeout. With an emulated SDIO card that never gets ready,
> the driver logs "FW download complete (0 bytes)" and gives up 30 seconds
> later with "FW failed to be active in time".
>
> Return -ETIMEDOUT when the poll runs out of tries. mwifiex, which this
> function was derived from, returns an error in the same place.
>
> Noticed while looking at a clang -Wconditional-uninitialized warning on
> this return statement. Tested only in QEMU with an SDIO card model
> written for this test, not on real hardware.
>
> Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x")
> Assisted-by: LLM
>
Don't let LLMs write commit messages, they suck at it.
johannes