Skip to content

Commit b6c8212

Browse files
cvinayaknashif
authored andcommitted
Bluetooth: Controller: Fix regression in connection update
The connection event at the connection update instant was skipped due to previous ticker node in use that is being stopped was registering a relative occupied time that overlapped with the new ticker node being started for scheduling the connection with new interval. Added mock interface for ticker_stop_abs() hence needed by the Controller unit testing. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> (cherry picked from commit 5dffad0)
1 parent 8bbbf1d commit b6c8212

File tree

2 files changed

+10
-2
lines changed
  • subsys/bluetooth/controller/ll_sw
  • tests/bluetooth/controller/mock_ctrl/src

2 files changed

+10
-2
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,9 @@ static void ull_conn_update_ticker(struct ll_conn *conn,
20932093

20942094
/* start periph/central with new timings */
20952095
uint8_t ticker_id_conn = TICKER_ID_CONN_BASE + ll_conn_handle_get(conn);
2096-
uint32_t ticker_status = ticker_stop(TICKER_INSTANCE_ID_CTLR, TICKER_USER_ID_ULL_HIGH,
2097-
ticker_id_conn, ticker_stop_conn_op_cb, (void *)conn);
2096+
uint32_t ticker_status = ticker_stop_abs(TICKER_INSTANCE_ID_CTLR, TICKER_USER_ID_ULL_HIGH,
2097+
ticker_id_conn, ticks_at_expire,
2098+
ticker_stop_conn_op_cb, (void *)conn);
20982099
LL_ASSERT((ticker_status == TICKER_STATUS_SUCCESS) ||
20992100
(ticker_status == TICKER_STATUS_BUSY));
21002101
ticker_status = ticker_start(

tests/bluetooth/controller/mock_ctrl/src/ticker.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@ uint8_t ticker_stop(uint8_t instance_index, uint8_t user_id, uint8_t ticker_id,
3232
{
3333
return TICKER_STATUS_SUCCESS;
3434
}
35+
36+
uint8_t ticker_stop_abs(uint8_t instance_index, uint8_t user_id,
37+
uint8_t ticker_id, uint32_t ticks_at_stop,
38+
ticker_op_func fp_op_func, void *op_context)
39+
{
40+
return TICKER_STATUS_SUCCESS;
41+
}

0 commit comments

Comments
 (0)