Bluetooth: Controller: Refactor out initiator reset

Refactor out the initiator reset implementation into a
function.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2021-09-09 16:19:16 +05:30 committed by Carles Cufí
commit 29ae143a10
4 changed files with 44 additions and 36 deletions

View file

@ -759,6 +759,11 @@ int ull_conn_reset(void)
uint16_t handle;
int err;
#if defined(CONFIG_BT_CENTRAL)
/* Reset initiator */
(void)ull_master_reset();
#endif /* CONFIG_BT_CENTRAL */
for (handle = 0U; handle < CONFIG_BT_MAX_CONN; handle++) {
disable(handle);
}