You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/12 16:39:15 UTC
(mynewt-nimble) 05/08: nimble/host: Fix EATT busy loop while waiting for credits
This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 47aa972a4b57010930c376c444d72904dccd322d
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Oct 7 18:37:23 2026 +0200
nimble/host: Fix EATT busy loop while waiting for credits
If an EATT PDU could not be sent because the channel was busy with a
stalled SDU, the wakeup event was queued immediately, which retried the
send and requeued itself for as long as the peer did not provide
credits. Only queue the PDU; it is sent once the channel is unstalled.
Assisted-by: Claude:claude-opus-5-5
---
nimble/host/src/ble_eatt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/nimble/host/src/ble_eatt.c b/nimble/host/src/ble_eatt.c
index 5b3bdb354..07f6129f6 100644
--- a/nimble/host/src/ble_eatt.c
+++ b/nimble/host/src/ble_eatt.c
@@ -514,8 +514,10 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct os_mbuf *txom)
BLE_EATT_LOG_DEBUG("ble_eatt_tx: Eatt stalled");
} else if (rc == BLE_HS_EBUSY) {
BLE_EATT_LOG_DEBUG("ble_eatt_tx: Message queued");
+ /* Channel is stalled waiting for credits, queued PDU will be sent
+ * on BLE_L2CAP_EVENT_COC_TX_UNSTALLED event.
+ */
STAILQ_INSERT_HEAD(&eatt->eatt_tx_q, OS_MBUF_PKTHDR(txom), omp_next);
- ble_npl_eventq_put(ble_hs_evq_get(), &eatt->wakeup_ev);
} else {
BLE_EATT_LOG_ERROR("eatt: %s, ERROR %d ", __func__, rc);
assert(0);