Merge branch 'bugfix/fix_xQueueSemaphoreTask_assert_when_deinit_host_v4.4' into 'release/v4.4'

Fixed xQueueSemaphoreTask assert when deinit host during scan (backport v4.4)

See merge request espressif/esp-idf!28886
This commit is contained in:
Jiang Jiang Jian 2024-02-05 11:03:33 +08:00
commit 2b490aeb2d

View File

@ -134,15 +134,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);
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;
hci_hal_env.rx_q = NULL;
pkt_queue_destroy(hci_hal_env.adv_rpt_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);