From 4ad6162832e9fda59e2114dc67c31d262b7a374d Mon Sep 17 00:00:00 2001 From: Bas van den Berg Date: Thu, 21 Apr 2022 13:52:53 +0200 Subject: [PATCH] fix init ordering When building an application (eg btshell), ble_svc_gap_init() is at stage 301 ble_transport_hs_init() happens at the end after 1000 But ble_svc_gap_init calls (through ble_gatts_add_svcs) ble_hs_lock() that uses the ble_hs_mutex. This mutex is only initialized in ble_hs_init() (via ble_transport_hs_init), so this must be called first --- nimble/transport/pkg.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nimble/transport/pkg.yml b/nimble/transport/pkg.yml index 5fbcbd21f..03924ced5 100644 --- a/nimble/transport/pkg.yml +++ b/nimble/transport/pkg.yml @@ -52,9 +52,7 @@ pkg.deps.BLE_MONITOR_RTT: pkg.init: ble_transport_init: 250 - ble_transport_hs_init: - - $after:ble_transport_init - - $before:ble_transport_ll_init + ble_transport_hs_init: 251 ble_transport_ll_init: - $after:ble_transport_hs_init