mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
fix(nimble): Fixed race condition happening with hci outstanding packets counter
This commit is contained in:
@@ -830,8 +830,14 @@ ble_hs_hci_acl_tx_now(struct ble_hs_conn *conn, struct os_mbuf **om)
|
||||
BLE_HS_LOG(DEBUG, "\n");
|
||||
#endif
|
||||
|
||||
/* Account for the controller buf that will hold the txed fragment. */
|
||||
conn->bhc_outstanding_pkts++;
|
||||
ble_hs_hci_avail_pkts--;
|
||||
|
||||
rc = ble_hs_tx_data(frag);
|
||||
if (rc != 0) {
|
||||
conn->bhc_outstanding_pkts--;
|
||||
ble_hs_hci_avail_pkts++;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -840,10 +846,6 @@ ble_hs_hci_acl_tx_now(struct ble_hs_conn *conn, struct os_mbuf **om)
|
||||
*/
|
||||
conn->bhc_flags |= BLE_HS_CONN_F_TX_FRAG;
|
||||
pb = BLE_HCI_PB_MIDDLE;
|
||||
|
||||
/* Account for the controller buf that will hold the txed fragment. */
|
||||
conn->bhc_outstanding_pkts++;
|
||||
ble_hs_hci_avail_pkts--;
|
||||
}
|
||||
|
||||
if (txom != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user