@@ -1934,10 +1934,9 @@ static inline int event_conn_upd_prep(struct ll_conn *conn, u16_t lazy,
1934
1934
ctrl_tx_enqueue (conn , tx );
1935
1935
1936
1936
} else if (instant_latency <= 0x7FFF ) {
1937
- u32_t mayfly_was_enabled ;
1937
+ u32_t ticks_slot_overhead ;
1938
1938
u16_t conn_interval_old ;
1939
1939
u16_t conn_interval_new ;
1940
- u32_t ticks_slot_offset ;
1941
1940
u32_t ticks_win_offset ;
1942
1941
u32_t conn_interval_us ;
1943
1942
struct node_rx_pdu * rx ;
@@ -2026,9 +2025,17 @@ static inline int event_conn_upd_prep(struct ll_conn *conn, u16_t lazy,
2026
2025
lll -> latency_prepare += lazy ;
2027
2026
lll -> latency_prepare -= (instant_latency - latency );
2028
2027
2029
- /* calculate the offset, window widening and interval */
2030
- ticks_slot_offset = MAX (conn -> evt .ticks_active_to_start ,
2031
- conn -> evt .ticks_xtal_to_start );
2028
+ /* calculate the offset */
2029
+ if (IS_ENABLED (CONFIG_BT_CTLR_LOW_LAT )) {
2030
+ ticks_slot_overhead =
2031
+ MAX (conn -> evt .ticks_active_to_start ,
2032
+ conn -> evt .ticks_xtal_to_start );
2033
+
2034
+ } else {
2035
+ ticks_slot_overhead = 0U ;
2036
+ }
2037
+
2038
+ /* calculate the window widening and interval */
2032
2039
conn_interval_us = conn -> llcp .conn_upd .interval * 1250U ;
2033
2040
periodic_us = conn_interval_us ;
2034
2041
if (lll -> role ) {
@@ -2101,8 +2108,9 @@ static inline int event_conn_upd_prep(struct ll_conn *conn, u16_t lazy,
2101
2108
/* disable ticker job, in order to chain stop and start
2102
2109
* to avoid RTC being stopped if no tickers active.
2103
2110
*/
2104
- mayfly_was_enabled = mayfly_is_enabled (TICKER_USER_ID_ULL_HIGH ,
2105
- TICKER_USER_ID_ULL_LOW );
2111
+ u32_t mayfly_was_enabled =
2112
+ mayfly_is_enabled (TICKER_USER_ID_ULL_HIGH ,
2113
+ TICKER_USER_ID_ULL_LOW );
2106
2114
mayfly_enable (TICKER_USER_ID_ULL_HIGH , TICKER_USER_ID_ULL_LOW ,
2107
2115
0 );
2108
2116
#endif
@@ -2128,7 +2136,8 @@ static inline int event_conn_upd_prep(struct ll_conn *conn, u16_t lazy,
2128
2136
#else
2129
2137
TICKER_NULL_LAZY ,
2130
2138
#endif /* CONFIG_BT_CTLR_CONN_META */
2131
- (ticks_slot_offset + conn -> evt .ticks_slot ),
2139
+ (ticks_slot_overhead +
2140
+ conn -> evt .ticks_slot ),
2132
2141
#if defined(CONFIG_BT_PERIPHERAL ) && defined(CONFIG_BT_CENTRAL )
2133
2142
lll -> role ? ull_slave_ticker_cb :
2134
2143
ull_master_ticker_cb ,
0 commit comments