* [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio
@ 2019-11-26 9:18 Wen Gong
2020-04-22 7:03 ` Kalle Valo
2020-04-22 7:03 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Wen Gong @ 2019-11-26 9:18 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless
sdio chip use DMA buffer to receive TX packet from ath10k, and it has
limitation of each buffer, if the packet size exceed the credit size,
it will trigger error in firmware.
Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00017-QCARMSWP-1.
Signed-off-by: Wen Gong <wgong@codeaurora.org>
---
this patch depens on the patch "ath10k: add htt TX bundle for sdio"
drivers/net/wireless/ath/ath10k/htc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 03c358cd16d4..51addcc654a0 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -846,6 +846,11 @@ int ath10k_htc_send_hl(struct ath10k_htc *htc,
struct ath10k_htc_ep *ep = &htc->endpoint[eid];
struct ath10k *ar = htc->ar;
+ if (sizeof(struct ath10k_htc_hdr) + skb->len > ep->tx_credit_size) {
+ ath10k_dbg(ar, ATH10K_DBG_HTC, "tx exceed max len %d\n", skb->len);
+ return -ENOMEM;
+ }
+
ath10k_dbg(ar, ATH10K_DBG_HTC, "htc send hl: eid:%d, bundle:%d, tx count:%d, len:%d\n",
eid, ep->bundle_tx, skb_queue_len(&ep->tx_req_head), skb->len);
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio
2019-11-26 9:18 [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio Wen Gong
@ 2020-04-22 7:03 ` Kalle Valo
2020-04-22 7:03 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-04-22 7:03 UTC (permalink / raw)
To: Wen Gong; +Cc: linux-wireless, ath10k
Wen Gong <wgong@codeaurora.org> wrote:
> sdio chip use DMA buffer to receive TX packet from ath10k, and it has
> limitation of each buffer, if the packet size exceed the credit size,
> it will trigger error in firmware.
>
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00017-QCARMSWP-1.
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
This doesn't apply anymore, please rebase.
error: patch failed: drivers/net/wireless/ath/ath10k/htc.c:846
error: drivers/net/wireless/ath/ath10k/htc.c: patch does not apply
stg import: Diff does not apply cleanly
Patch set to Changes Requested.
--
https://patchwork.kernel.org/patch/11261695/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio
2019-11-26 9:18 [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio Wen Gong
2020-04-22 7:03 ` Kalle Valo
@ 2020-04-22 7:03 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-04-22 7:03 UTC (permalink / raw)
To: Wen Gong; +Cc: ath10k, linux-wireless
Wen Gong <wgong@codeaurora.org> wrote:
> sdio chip use DMA buffer to receive TX packet from ath10k, and it has
> limitation of each buffer, if the packet size exceed the credit size,
> it will trigger error in firmware.
>
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00017-QCARMSWP-1.
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
This doesn't apply anymore, please rebase.
error: patch failed: drivers/net/wireless/ath/ath10k/htc.c:846
error: drivers/net/wireless/ath/ath10k/htc.c: patch does not apply
stg import: Diff does not apply cleanly
Patch set to Changes Requested.
--
https://patchwork.kernel.org/patch/11261695/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio
@ 2019-11-26 9:18 Wen Gong
0 siblings, 0 replies; 4+ messages in thread
From: Wen Gong @ 2019-11-26 9:18 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless
sdio chip use DMA buffer to receive TX packet from ath10k, and it has
limitation of each buffer, if the packet size exceed the credit size,
it will trigger error in firmware.
Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00017-QCARMSWP-1.
Signed-off-by: Wen Gong <wgong@codeaurora.org>
---
this patch depens on the patch "ath10k: add htt TX bundle for sdio"
drivers/net/wireless/ath/ath10k/htc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 03c358cd16d4..51addcc654a0 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -846,6 +846,11 @@ int ath10k_htc_send_hl(struct ath10k_htc *htc,
struct ath10k_htc_ep *ep = &htc->endpoint[eid];
struct ath10k *ar = htc->ar;
+ if (sizeof(struct ath10k_htc_hdr) + skb->len > ep->tx_credit_size) {
+ ath10k_dbg(ar, ATH10K_DBG_HTC, "tx exceed max len %d\n", skb->len);
+ return -ENOMEM;
+ }
+
ath10k_dbg(ar, ATH10K_DBG_HTC, "htc send hl: eid:%d, bundle:%d, tx count:%d, len:%d\n",
eid, ep->bundle_tx, skb_queue_len(&ep->tx_req_head), skb->len);
--
2.23.0
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-22 7:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-26 9:18 [PATCH] ath10k: drop the TX packet which size exceed credit size for sdio Wen Gong
2020-04-22 7:03 ` Kalle Valo
2020-04-22 7:03 ` Kalle Valo
-- strict thread matches above, loose matches on Subject: below --
2019-11-26 9:18 Wen Gong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.