From 4ca2489c6c2dbcece367777796c6d51a5d7d4c78 Mon Sep 17 00:00:00 2001 From: CW-B-W Date: Thu, 17 Aug 2023 04:43:29 +0800 Subject: [PATCH] porting/nimble_port: fix controller not initialized When using external controller, ble_transport_ll_init() was not run because of NIMBLE_CFG_CONTROLLER was not defined. But under current architecture ble_transport_ll_init() should also be run to initialize the communication interface. --- porting/nimble/src/nimble_port.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/porting/nimble/src/nimble_port.c b/porting/nimble/src/nimble_port.c index 1bd57f2b04..bb26f22a3f 100644 --- a/porting/nimble/src/nimble_port.c +++ b/porting/nimble/src/nimble_port.c @@ -22,9 +22,9 @@ #include "sysinit/sysinit.h" #include "host/ble_hs.h" #include "nimble/nimble_port.h" +#include "nimble/transport.h" #if NIMBLE_CFG_CONTROLLER #include "controller/ble_ll.h" -#include "nimble/transport.h" #endif static struct ble_npl_eventq g_eventq_dflt; @@ -50,8 +50,10 @@ nimble_port_init(void) hal_timer_init(5, NULL); os_cputime_init(32768); #endif - ble_transport_ll_init(); #endif + + /* Initialize the controller */ + ble_transport_ll_init(); } void