From fb94d9175f95ce986809b1074e4c8db303db6537 Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Mon, 29 Jan 2024 15:08:44 +0800 Subject: [PATCH 1/2] Fixed xQueueSemaphoreTask assert when deinit host during scan --- components/bt/host/bluedroid/hci/hci_hal_h4.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/bt/host/bluedroid/hci/hci_hal_h4.c b/components/bt/host/bluedroid/hci/hci_hal_h4.c index 76ae0a1094aa..cbdf9adbe073 100644 --- a/components/bt/host/bluedroid/hci/hci_hal_h4.c +++ b/components/bt/host/bluedroid/hci/hci_hal_h4.c @@ -138,15 +138,20 @@ static bool hci_hal_env_init(const hci_hal_callbacks_t *upper_callbacks, osi_thr static void hci_hal_env_deinit(void) { - fixed_queue_free(hci_hal_env.rx_q, osi_free_func); - hci_hal_env.rx_q = NULL; + fixed_queue_t *rx_q = hci_hal_env.rx_q; + struct pkt_queue *adv_rpt_q = hci_hal_env.adv_rpt_q; + struct osi_event *upstream_data_ready = hci_hal_env.upstream_data_ready; - pkt_queue_destroy(hci_hal_env.adv_rpt_q, NULL); + hci_hal_env.rx_q = NULL; hci_hal_env.adv_rpt_q = NULL; - - osi_event_delete(hci_hal_env.upstream_data_ready); hci_hal_env.upstream_data_ready = NULL; + fixed_queue_free(rx_q, osi_free_func); + + pkt_queue_destroy(adv_rpt_q, NULL); + + osi_event_delete(upstream_data_ready); + #if (BLE_ADV_REPORT_FLOW_CONTROL == TRUE) hci_hal_env.cmd_buf_in_use = true; osi_alarm_cancel(hci_hal_env.adv_flow_monitor); From 4a413b9d27639c46ca59223de07931edfc3cb57e Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Sun, 4 Feb 2024 14:15:53 +0800 Subject: [PATCH 2/2] feat(ble/controller): Add API to get BLE controller status on ESP32 --- components/bt/controller/lib_esp32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32 b/components/bt/controller/lib_esp32 index b0f132f17ed4..e43c9b121f7f 160000 --- a/components/bt/controller/lib_esp32 +++ b/components/bt/controller/lib_esp32 @@ -1 +1 @@ -Subproject commit b0f132f17ed48553a4638344023d44af61b7c20a +Subproject commit e43c9b121f7fac89b73c56077ede5901f64643cd