RE: [PATCH] wifi: rtw89: fw: propagate real error code in rtw89_fw_h2c_add_general_pkt()
From: Ping-Ke Shih
Date: Tue Sep 01 2026 - 21:34:51 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")
This patch isn't so serious. I'd not add Fixes.
> Signed-off-by: Gongwei Li <ligongwei@xxxxxxxxxx>
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>