* [PATCH] ath11k: cleanup reo command error code overwritten
@ 2020-04-13 11:21 Govindaraj Saminathan
2020-04-15 8:04 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Govindaraj Saminathan @ 2020-04-13 11:21 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Govindaraj Saminathan
should not overwrite the error code. No buffer available then return
invalid. For other failures return the error code of actual failure.
Signed-off-by: Govindaraj Saminathan <gsamin@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 7aac4b0..6f40e72 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -543,8 +543,12 @@ int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx_tid,
cmd_ring = &ab->hal.srng_list[dp->reo_cmd_ring.ring_id];
cmd_num = ath11k_hal_reo_cmd_send(ab, cmd_ring, type, cmd);
+ /* cmd_num should start from 1, during failure return the error code */
+ if (cmd_num < 0)
+ return cmd_num;
+
/* reo cmd ring descriptors has cmd_num starting from 1 */
- if (cmd_num <= 0)
+ if (cmd_num == 0)
return -EINVAL;
if (!cb)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: cleanup reo command error code overwritten
2020-04-13 11:21 [PATCH] ath11k: cleanup reo command error code overwritten Govindaraj Saminathan
@ 2020-04-15 8:04 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-04-15 8:04 UTC (permalink / raw)
To: Govindaraj Saminathan; +Cc: ath11k, linux-wireless, Govindaraj Saminathan
Govindaraj Saminathan <gsamin@codeaurora.org> wrote:
> should not overwrite the error code. No buffer available then return
> invalid. For other failures return the error code of actual failure.
>
> Signed-off-by: Govindaraj Saminathan <gsamin@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
e190bc05b191 ath11k: cleanup reo command error code overwritten
--
https://patchwork.kernel.org/patch/11485447/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-15 8:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 11:21 [PATCH] ath11k: cleanup reo command error code overwritten Govindaraj Saminathan
2020-04-15 8:04 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).