Skip to contentSkip to conversation

ath10k: drop the TX packet which size exceed credit size for sdio

PATCH In review Wen Gong 2 participants 3 messages Apr 22, 2020 – Apr 23, 2020 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Wen Gong

author
#0 lore raw

PATCH v2 1/1 ath10k: drop the TX packet which size exceed credit size for sdio

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.

---
v2: rebase to ath-next

 drivers/net/wireless/ath/ath10k/htc.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/wireless/ath/ath10k/htc.c +5 -0
index 58ceba75d20a..31df6dd04bf6 100644
@@ -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);
 
Signature · 1 line
2.23.0
#1 lore raw
Quoted 9 lines · Wen Gong

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.

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

8347784d6f5f ath10k: drop the TX packet which size exceed credit size for sdio

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

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

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#2 lore raw
In reply to Wen Gong
Quoted 9 lines · Wen Gong

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.

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

8347784d6f5f ath10k: drop the TX packet which size exceed credit size for sdio

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

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