mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/add_dummy_cb_during_deinit' into 'master'
fix(nimble): De-register host cb in stack deinit See merge request espressif/esp-idf!33251
This commit is contained in:
commit
cfb78587f3
@ -190,6 +190,11 @@ static void controller_rcv_pkt_ready(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy_controller_rcv_pkt_ready(void)
|
||||
{
|
||||
/* Dummy function */
|
||||
}
|
||||
|
||||
void bt_record_hci_data(uint8_t *data, uint16_t len)
|
||||
{
|
||||
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
@ -203,6 +208,12 @@ void bt_record_hci_data(uint8_t *data, uint16_t len)
|
||||
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
}
|
||||
|
||||
static int dummy_host_rcv_pkt(uint8_t *data, uint16_t len)
|
||||
{
|
||||
/* Dummy function */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief: BT controller callback function, to transfer data packet to the host
|
||||
*/
|
||||
@ -264,6 +275,11 @@ static const esp_vhci_host_callback_t vhci_host_cb = {
|
||||
.notify_host_recv = host_rcv_pkt,
|
||||
};
|
||||
|
||||
static const esp_vhci_host_callback_t dummy_vhci_host_cb = {
|
||||
.notify_host_send_available = dummy_controller_rcv_pkt_ready,
|
||||
.notify_host_recv = dummy_host_rcv_pkt,
|
||||
};
|
||||
|
||||
|
||||
extern void ble_transport_init(void);
|
||||
extern esp_err_t ble_buf_alloc(void);
|
||||
@ -313,6 +329,8 @@ esp_err_t esp_nimble_hci_deinit(void)
|
||||
}
|
||||
ble_transport_deinit();
|
||||
|
||||
esp_vhci_host_register_callback(&dummy_vhci_host_cb);
|
||||
|
||||
ble_buf_free();
|
||||
|
||||
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 6b890f81c0db10ae4757e27eb1312f4232d8fb56
|
||||
Subproject commit 81a116a81595e825c9f01ea5cafed8d18fc8a095
|
@ -177,6 +177,12 @@ ble_transport_ll_init(void)
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
ble_transport_ll_deinit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
ble_transport_to_ll_acl_impl(struct os_mbuf *om)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user