You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2021/10/04 09:17:21 UTC
[mynewt-nimble] branch master updated: nimble/ll: Fix handling of
removing adv item from scheduler
This is an automated email from the ASF dual-hosted git repository.
andk 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 aa14cf8 nimble/ll: Fix handling of removing adv item from scheduler
aa14cf8 is described below
commit aa14cf801ae36d22ca5889541bc2149a347700b6
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Sep 29 21:24:21 2021 +0200
nimble/ll: Fix handling of removing adv item from scheduler
If adv item is removed from scheduler we should drop event instead
of just sending done event.
Sending done event instead can cause issues on extended advertising
instances if we remove aux items since it does not clear aux_active
flag. As a result, when done even is handled and we reached max_events,
HCI event will not be sent since it waits for done event for secondary
channel but that one won't cone since aux items are already removed.
---
nimble/controller/src/ble_ll_adv.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index 6ab6b24..7efe914 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -206,6 +206,8 @@ struct ble_ll_adv_sm
struct ble_ll_adv_sm g_ble_ll_adv_sm[BLE_ADV_INSTANCES];
struct ble_ll_adv_sm *g_ble_ll_cur_adv_sm;
+static void ble_ll_adv_drop_event(struct ble_ll_adv_sm *advsm);
+
static struct ble_ll_adv_sm *
ble_ll_adv_sm_find_configured(uint8_t instance)
{
@@ -1049,12 +1051,7 @@ ble_ll_adv_tx_done(void *arg)
void
ble_ll_adv_event_rmvd_from_sched(struct ble_ll_adv_sm *advsm)
{
- /*
- * Need to set advertising channel to final chan so new event gets
- * scheduled.
- */
- advsm->adv_chan = ble_ll_adv_final_chan(advsm);
- ble_npl_eventq_put(&g_ble_ll_data.ll_evq, &advsm->adv_txdone_ev);
+ ble_ll_adv_drop_event(advsm);
}
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV)