You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/04/02 15:10:39 UTC

[mynewt-nimble] branch master updated: host: Wake up stalled conns when a conn is dropped

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new fd27d2f  host: Wake up stalled conns when a conn is dropped
fd27d2f is described below

commit fd27d2fdc5b2f211b1586b2653a81f02afa3e32a
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Apr 1 11:31:56 2019 -0700

    host: Wake up stalled conns when a conn is dropped
    
    When a connection is dropped, it may free up some ACL packet capacity in
    the controller.  When this happens, we need to wake up all stalled
    connections.
    
    We want to wake up connections every time the ACL data buffer capcity
    increases (whenever `ble_hs_hci_add_avail_pkts()` is called).
---
 nimble/host/src/ble_hs_hci_evt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/nimble/host/src/ble_hs_hci_evt.c b/nimble/host/src/ble_hs_hci_evt.c
index bd0fd00..0ccd9e8 100644
--- a/nimble/host/src/ble_hs_hci_evt.c
+++ b/nimble/host/src/ble_hs_hci_evt.c
@@ -166,6 +166,12 @@ ble_hs_hci_evt_disconn_complete(uint8_t event_code, uint8_t *data, int len)
 
     ble_gap_rx_disconn_complete(&evt);
 
+    /* The connection termination may have freed up some capacity in the
+     * controller for additional ACL data packets.  Wake up any stalled
+     * connections.
+     */
+    ble_hs_wakeup_tx();
+
     return 0;
 }