diff options
author | 2025-05-13 10:10:09 +0800 | |
---|---|---|
committer | 2025-05-14 19:26:55 -0700 | |
commit | 09e76365baa1d3fb7617d48f00662d32dd9d4828 (patch) | |
tree | 6a3145f8613975975a8f14e418f4b40d83d10ff9 | |
parent | net: libwx: Fix FW mailbox reply timeout (diff) | |
download | wireguard-linux-09e76365baa1d3fb7617d48f00662d32dd9d4828.tar.xz wireguard-linux-09e76365baa1d3fb7617d48f00662d32dd9d4828.zip |
net: libwx: Fix FW mailbox unknown command
For the new SW-FW interaction, missing the error return if there is an
unknown command. It causes the driver to mistakenly believe that the
interaction is complete. This problem occurs when new driver is paired
with old firmware, which does not support the new mailbox commands.
Fixes: 2e5af6b2ae85 ("net: txgbe: Add basic support for new AML devices")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/64DBB705D35A0016+20250513021009.145708-4-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/wangxun/libwx/wx_hw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c index ccdc57e9b0d5..490d34233d38 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c @@ -442,6 +442,12 @@ static int wx_host_interface_command_r(struct wx *wx, u32 *buffer, goto rel_out; } + if (hdr->cmd_or_resp.ret_status == 0x80) { + wx_err(wx, "Unknown FW command: 0x%x\n", send_cmd); + err = -EINVAL; + goto rel_out; + } + /* expect no reply from FW then return */ if (!return_data) goto rel_out; |