Skip to contentSkip to conversation

ath11k: cleanup reo command error code overwritten

PATCH In review Govindaraj Saminathan 2 participants 3 messages Apr 13, 2020 – Apr 15, 2020 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k: cleanup reo command error code overwritten

should not overwrite the error code. No buffer available then return invalid. For other failures return the error code of actual failure.

---
 drivers/net/wireless/ath/ath11k/dp_tx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/dp_tx.c +5 -1
index 7aac4b0..6f40e72 100644
@@ -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)
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Govindaraj Saminathan

should not overwrite the error code. No buffer available then return invalid. For other failures return the error code of actual failure.

Patch applied to ath-next branch of ath.git, thanks.

e190bc05b191 ath11k: cleanup reo command error code overwritten

Signature · 8 lines
https://patchwork.kernel.org/patch/11485447/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#2 lore raw
In reply to Govindaraj Saminathan
Quoted 5 lines · Govindaraj Saminathan

should not overwrite the error code. No buffer available then return invalid. For other failures return the error code of actual failure.

Patch applied to ath-next branch of ath.git, thanks.

e190bc05b191 ath11k: cleanup reo command error code overwritten

Signature · 3 lines
https://patchwork.kernel.org/patch/11485447/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches