Skip to content
Permalink
Browse files

Bluetooth: controller: Move ticker_id_prepare reset to early return

Move the reset of ticker_id_prepare variable to the early
return in event_connection_prepare function.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information...
cvinayak authored and aescolar committed Jul 10, 2019
1 parent 44d6838 commit 6d272a17f4de3d77427cbe52af0b728e86b1de9d
Showing with 7 additions and 6 deletions.
  1. +7 −6 subsys/bluetooth/controller/ll_sw/ctrl.c
@@ -7135,10 +7135,6 @@ static inline u32_t event_conn_upd_prep(struct connection *conn,
conn->procedure_expire = 0U;
}
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
/* Reset ticker_id_prepare as role is not continued further
* due to conn update at this event.
*/
_radio.ticker_id_prepare = 0U;

/* reset mutex */
if (_radio.conn_upd == conn) {
@@ -8524,8 +8520,13 @@ static void event_connection_prepare(u32_t ticks_at_expire,

switch (conn->llcp_type) {
case LLCP_CONN_UPD:
if (event_conn_upd_prep(conn, event_counter,
ticks_at_expire) == 0) {
if (!event_conn_upd_prep(conn, event_counter,
ticks_at_expire)) {
/* Reset ticker_id_prepare as role is not
* continued further due to conn update at
* this event.
*/
_radio.ticker_id_prepare = 0U;
return;
}
break;

0 comments on commit 6d272a1

Please sign in to comment.
You can’t perform that action at this time.