Re: [PATCH] wifi: rtw89: fw: propagate real error code in rtw89_fw_h2c_add_general_pkt()

From: Ping-Ke Shih

Date: Mon Sep 07 2026 - 22:49:00 EST


Gongwei Li <13875017792@xxxxxxx> wrote:

> From: Gongwei Li <ligongwei@xxxxxxxxxx>
>
> The error path of rtw89_fw_h2c_add_general_pkt() returns -ENOMEM
> unconditionally, which masks the real reason of a failure. In
> particular:
>
> * rtw89_fw_h2c_add_pkt_offload() can fail with -ENOSPC when no more
> packet offload slot is available, or with the error of H2C TX, but
> the callers only see -ENOMEM and get misled when debugging.
>
> * For an unsupported type, the switch default case returns -ENOMEM,
> which is misleading and should be -EINVAL.
>
> Return a real error code instead of -ENOMEM, and use -EINVAL for
> unsupported types.
>
> Fixes: 5c12bb66b79d ("wifi: rtw89: refine packet offload flow")
> Signed-off-by: Gongwei Li <ligongwei@xxxxxxxxxx>

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

5469ea5a14aa wifi: rtw89: fw: propagate real error code in rtw89_fw_h2c_add_general_pkt()

---
https://github.com/pkshih/rtw.git