Skip to content

Commit 789fc35

Browse files
[nrf fromtree] net: openthread: fix otPlatBleEnable
If BLE has already been enabled, `bt_enable` returns immediately and does not call passed callback function. In this case, call `bt_conn_cb_register` to ensure that callbacks are registered correctly. Signed-off-by: Maciej Baczmanski <[email protected]> (cherry picked from commit 1bd8e44)
1 parent ef646ce commit 789fc35

File tree

1 file changed

+1
-1
lines changed
  • modules/openthread/platform

1 file changed

+1
-1
lines changed

modules/openthread/platform/ble.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ otError otPlatBleEnable(otInstance *aInstance)
476476
LOG_WRN("BLE enable failed with error code %d", err);
477477
return OT_ERROR_FAILED;
478478
} else if (err == -EALREADY) {
479-
err = k_sem_take(&ot_plat_ble_init_semaphore, K_MSEC(500));
479+
bt_conn_cb_register(&conn_callbacks);
480480
return OT_ERROR_NONE;
481481
}
482482

0 commit comments

Comments
 (0)