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
commit 890be280a318b6e447acaa929ff22a2c713044e4 Author: Andrzej Kaczmarek <[email protected]> AuthorDate: Thu Feb 20 14:00:28 2025 +0100 nimble/ll: Update chanmap in BIGInfo after completed chanmap update Channel map needs to be update in BIGInfo after change since BIGInfo is precalculated and not generated before each tx. --- nimble/controller/src/ble_ll_iso_big.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nimble/controller/src/ble_ll_iso_big.c b/nimble/controller/src/ble_ll_iso_big.c index de895b1ea..1b4e50d36 100644 --- a/nimble/controller/src/ble_ll_iso_big.c +++ b/nimble/controller/src/ble_ll_iso_big.c @@ -255,6 +255,18 @@ ble_ll_iso_big_last_tx_timestamp_get(struct ble_ll_iso_bis *bis, return 0; } +static void +ble_ll_iso_big_biginfo_chanmap_update(struct ble_ll_iso_big *big) +{ + uint8_t *buf; + + buf = &big->biginfo[23]; + + /* chm, phy */ + memcpy(buf, big->chan_map, 5); + buf[4] |= (big->phy - 1) << 5; +} + static void ble_ll_iso_big_biginfo_calc(struct ble_ll_iso_big *big, uint32_t seed_aa) { @@ -296,8 +308,7 @@ ble_ll_iso_big_biginfo_calc(struct ble_ll_iso_big *big, uint32_t seed_aa) /* chm, phy */ memcpy(buf, big->chan_map, 5); - buf[4] |= (big->phy - 1) << 5; - buf += 5; + ble_ll_iso_big_biginfo_chanmap_update(big); /* bis_payload_cnt, framing */ memset(buf, 0x00, 5); @@ -437,6 +448,8 @@ ble_ll_iso_big_chan_map_update_complete(struct ble_ll_iso_big *big) { memcpy(big->chan_map, big->chan_map_new, BLE_LL_CHAN_MAP_LEN); big->chan_map_used = ble_ll_utils_chan_map_used_get(big->chan_map); + + ble_ll_iso_big_biginfo_chanmap_update(big); } static void
