diff --git a/components/bt/controller/esp32c2/bt.c b/components/bt/controller/esp32c2/bt.c index 3b65d50f9a5..5867c0fd657 100644 --- a/components/bt/controller/esp32c2/bt.c +++ b/components/bt/controller/esp32c2/bt.c @@ -956,11 +956,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) } os_msys_init(); -#if CONFIG_BT_NIMBLE_ENABLED - // ble_npl_eventq_init() need to use npl function in rom and must be called after esp_bt_controller_init() - /* Initialize default event queue */ - ble_npl_eventq_init(nimble_port_get_dflt_eventq()); -#endif + esp_phy_modem_init(); periph_module_enable(PERIPH_BT_MODULE); periph_module_reset(PERIPH_BT_MODULE); @@ -1043,9 +1039,7 @@ controller_init_err: modem_deint: esp_phy_modem_deinit(); periph_module_disable(PERIPH_BT_MODULE); -#if CONFIG_BT_NIMBLE_ENABLED - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED + free_mem: os_msys_buf_free(); npl_freertos_mempool_deinit(); @@ -1072,10 +1066,6 @@ esp_err_t esp_bt_controller_deinit(void) periph_module_disable(PERIPH_BT_MODULE); -#if CONFIG_BT_NIMBLE_ENABLED - /* De-initialize default event queue */ - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif os_msys_buf_free(); esp_unregister_npl_funcs(); diff --git a/components/bt/controller/esp32c5/bt.c b/components/bt/controller/esp32c5/bt.c index 85a6c3eea44..f86d3813774 100644 --- a/components/bt/controller/esp32c5/bt.c +++ b/components/bt/controller/esp32c5/bt.c @@ -1011,12 +1011,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) goto free_mem; } -#if CONFIG_BT_NIMBLE_ENABLED - /* ble_npl_eventq_init() needs to use npl functions in rom and - * must be called after esp_bt_controller_init(). - */ - ble_npl_eventq_init(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED /* Enable BT-related clocks */ modem_clock_module_enable(PERIPH_BT_MODULE); modem_clock_module_mac_reset(PERIPH_BT_MODULE); @@ -1120,9 +1114,7 @@ modem_deint: esp_phy_modem_deinit(); // modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); modem_clock_module_disable(PERIPH_BT_MODULE); -#if CONFIG_BT_NIMBLE_ENABLED - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED + free_mem: npl_freertos_mempool_deinit(); esp_unregister_npl_funcs(); @@ -1155,11 +1147,6 @@ esp_err_t esp_bt_controller_deinit(void) esp_bt_controller_log_deinit(); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED -#if CONFIG_BT_NIMBLE_ENABLED - /* De-initialize default event queue */ - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED - esp_unregister_npl_funcs(); esp_unregister_ext_funcs(); diff --git a/components/bt/controller/esp32c6/bt.c b/components/bt/controller/esp32c6/bt.c index d54828eb7c3..4fcd71a53ab 100644 --- a/components/bt/controller/esp32c6/bt.c +++ b/components/bt/controller/esp32c6/bt.c @@ -1091,12 +1091,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) goto free_mem; } -#if CONFIG_BT_NIMBLE_ENABLED - /* ble_npl_eventq_init() needs to use npl functions in rom and - * must be called after esp_bt_controller_init(). - */ - ble_npl_eventq_init(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED /* Enable BT-related clocks */ modem_clock_module_enable(PERIPH_BT_MODULE); modem_clock_module_mac_reset(PERIPH_BT_MODULE); @@ -1203,9 +1197,7 @@ modem_deint: esp_phy_modem_deinit(); modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); modem_clock_module_disable(PERIPH_BT_MODULE); -#if CONFIG_BT_NIMBLE_ENABLED - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED + free_mem: npl_freertos_mempool_deinit(); esp_unregister_npl_funcs(); @@ -1238,11 +1230,6 @@ esp_err_t esp_bt_controller_deinit(void) esp_bt_controller_log_deinit(); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED -#if CONFIG_BT_NIMBLE_ENABLED - /* De-initialize default event queue */ - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED - esp_unregister_npl_funcs(); esp_unregister_ext_funcs(); diff --git a/components/bt/controller/esp32h2/bt.c b/components/bt/controller/esp32h2/bt.c index 8119552e0b0..3354c7f7e06 100644 --- a/components/bt/controller/esp32h2/bt.c +++ b/components/bt/controller/esp32h2/bt.c @@ -1044,12 +1044,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) goto free_mem; } -#if CONFIG_BT_NIMBLE_ENABLED - /* ble_npl_eventq_init() needs to use npl functions in rom and - * must be called after esp_bt_controller_init(). - */ - ble_npl_eventq_init(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED /* Enable BT-related clocks */ modem_clock_module_enable(PERIPH_BT_MODULE); modem_clock_module_mac_reset(PERIPH_BT_MODULE); @@ -1154,9 +1148,7 @@ modem_deint: #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); modem_clock_module_disable(PERIPH_BT_MODULE); -#if CONFIG_BT_NIMBLE_ENABLED - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED + free_mem: npl_freertos_mempool_deinit(); esp_unregister_npl_funcs(); @@ -1188,11 +1180,6 @@ esp_err_t esp_bt_controller_deinit(void) esp_bt_controller_log_deinit(); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED -#if CONFIG_BT_NIMBLE_ENABLED - /* De-initialize default event queue */ - ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); -#endif // CONFIG_BT_NIMBLE_ENABLED - esp_unregister_npl_funcs(); esp_unregister_ext_funcs(); diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 081879d9538..aa5775e933d 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 081879d9538eaa7906a2cddd9ce86d76249bcefd +Subproject commit aa5775e933da6ff447ab6a37312d4fdbce052008