Skip to content

Commit 2ae86f4

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Use context specific get interface
As the range of ticker_id has been checked, context specific get interface be used instead of doing range check again in ull_hdr_get_cb(). Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent d93bc9d commit 2ae86f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

subsys/bluetooth/controller/ll_sw/ull_sched.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ int ull_sched_adv_aux_sync_free_slot_get(uint8_t user_id,
101101
if (IS_ENABLED(CONFIG_BT_CTLR_LOW_LAT)) {
102102
const struct ll_adv_aux_set *aux;
103103

104-
aux = (void *)ull_hdr_get_cb(ticker_id,
105-
&ticks_slot);
104+
aux = ull_adv_aux_get(ticker_id -
105+
TICKER_ID_ADV_AUX_BASE);
106106
*ticks_anchor +=
107107
MAX(aux->ull.ticks_active_to_start,
108108
aux->ull.ticks_prepare_to_start);
@@ -119,8 +119,8 @@ int ull_sched_adv_aux_sync_free_slot_get(uint8_t user_id,
119119
if (IS_ENABLED(CONFIG_BT_CTLR_LOW_LAT)) {
120120
const struct ll_adv_sync_set *sync;
121121

122-
sync = (void *)ull_hdr_get_cb(ticker_id,
123-
&ticks_slot);
122+
sync = ull_adv_sync_get(ticker_id -
123+
TICKER_ID_ADV_SYNC_BASE);
124124
*ticks_anchor +=
125125
MAX(sync->ull.ticks_active_to_start,
126126
sync->ull.ticks_prepare_to_start);
@@ -137,8 +137,8 @@ int ull_sched_adv_aux_sync_free_slot_get(uint8_t user_id,
137137
if (IS_ENABLED(CONFIG_BT_CTLR_LOW_LAT)) {
138138
const struct ll_adv_iso_set *iso;
139139

140-
iso = (void *)ull_hdr_get_cb(ticker_id,
141-
&ticks_slot);
140+
iso = ull_adv_iso_get(ticker_id -
141+
TICKER_ID_ADV_ISO_BASE);
142142
*ticks_anchor +=
143143
MAX(iso->ull.ticks_active_to_start,
144144
iso->ull.ticks_prepare_to_start);

0 commit comments

Comments
 (0)