Skip to content

Commit e48ea7e

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix BIG event counter calc from payload count
Fix the BIG event counter calculation from stored payload counter. Event latency should not be multiplied by burst count. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent 52a91fd commit e48ea7e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_iso.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ static int prepare_cb_common(struct lll_prepare_param *p)
194194
lll->latency_event = lll->latency_prepare - 1U;
195195

196196
/* Calculate the current event counter value */
197-
event_counter = (lll->payload_count / lll->bn) +
198-
(lll->latency_event * lll->bn);
197+
event_counter = (lll->payload_count / lll->bn) + lll->latency_event;
199198

200199
/* Update BIS packet counter to next value */
201200
lll->payload_count += (lll->latency_prepare * lll->bn);

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ static int prepare_cb_common(struct lll_prepare_param *p)
203203
lll->latency_event = lll->latency_prepare - 1U;
204204

205205
/* Calculate the current event counter value */
206-
event_counter = (lll->payload_count / lll->bn) +
207-
(lll->latency_event * lll->bn);
206+
event_counter = (lll->payload_count / lll->bn) + lll->latency_event;
208207

209208
/* Update BIS packet counter to next value */
210209
lll->payload_count += (lll->latency_prepare * lll->bn);

0 commit comments

Comments
 (0)