You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2019/01/25 18:20:52 UTC

[mynewt-nimble] branch master updated: nimble/ll: Fix update advertising data while advertising

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

rymek 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 0f35e1b  nimble/ll: Fix update advertising data while advertising
0f35e1b is described below

commit 0f35e1b1a20e1d41cb8e79391d5af713fa51ed85
Author: Ɓukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Wed Jan 23 22:04:20 2019 +0100

    nimble/ll: Fix update advertising data while advertising
    
    With this patch we make sure that if advertising or scan data has been
    changed just after advertising event had been completed, new data will
    be used in next advertising event.
    
    Note: For this moment we will skip one advertising event in order to
    recalculate timings for aux packet, but this could be improved in the
    future.
---
 nimble/controller/src/ble_ll_adv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index e2c941e..4be500b 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -856,6 +856,11 @@ ble_ll_adv_tx_start_cb(struct ble_ll_sched_item *sch)
 
     ble_ll_adv_active_chanset_set_pri(advsm);
 
+    if ((advsm->flags & BLE_LL_ADV_SM_FLAG_NEW_ADV_DATA) ||
+        (advsm->flags & BLE_LL_ADV_SM_FLAG_NEW_SCAN_RSP_DATA)) {
+        goto adv_tx_done;
+    }
+
     /* Set the power */
     ble_phy_txpwr_set(advsm->adv_txpwr);