Bluetooth: controller: Make random force on lost anchor configurable

Legacy functionality in ull_conn will force scheduling of a connection
which has missed an anchor point due to lost RX. This kicks in either
for previously skipped events (latenzy_event != 0) or at random
depending on the randomness of the AA bit pattern.

This behavior is good at ensuring that a connection with errors or
aborted RX gets prioitized, and helps break locked round-robin
patterns with lost sync, but it also breaks the predictability of
the round-robin ticker scheduling.

With "must_expire" enabled, this feature also kicks in for scheduling
collisions, which may not be desirable.

This commit adds a configuration flag, BT_CTLR_CONN_RANDOM_FORCE, which
is default enabled (legacy behavior).

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2020-11-22 23:02:15 +01:00 committed by Carles Cufí
commit 18c01ecae8
2 changed files with 16 additions and 2 deletions

View file

@ -1164,7 +1164,7 @@ void ull_conn_done(struct node_rx_event_done *done)
if (conn->supervision_expire <= 6U) {
force = 1U;
}
#if defined(CONFIG_BT_PERIPHERAL)
#if defined(CONFIG_BT_CTLR_CONN_RANDOM_FORCE)
/* use randomness to force slave role when anchor
* points are being missed.
*/
@ -1181,7 +1181,7 @@ void ull_conn_done(struct node_rx_event_done *done)
}
}
}
#endif /* CONFIG_BT_PERIPHERAL */
#endif /* CONFIG_BT_CTLR_CONN_RANDOM_FORCE */
} else {
conn_cleanup(conn, BT_HCI_ERR_CONN_TIMEOUT);