Re: [PATCH v2] staging: rtl8723bs: use errno in rtw_register_tx_alive()

From: Greg Kroah-Hartman

Date: Thu Oct 01 2026 - 08:18:56 EST


On Thu, Oct 01, 2026 at 04:56:43AM -0700, Hungyu Lin wrote:
> > Why are we returning success if there is an error?
>
> The original _FAIL means the firmware is not ready for TX yet.
> XMIT_ALIVE has already been set, and the buffers stay queued.
> cpwm_int_hdl() uses that bit to wake the TX thread once the power
> state reaches S2.
>
> _SUCCESS here lets rtw_xmit_thread() go back to waiting on xmit_comp.
> Returning -EAGAIN instead would stop the thread.
>
> I should have explained this in the commit message. Would handling
> -EAGAIN explicitly here, with a comment explaining the retry, be
> appropriate?

Please do.