mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-06 20:42:47 +00:00
transport/usb: Drop events when not mounted
If controller sends events before USB transport is ready event will be added to events queue but later interface initialization will clear queue without sending notification that event was sent to host. This change drops events generated by controller (most likely first NOP) if host is not connected yet.
This commit is contained in:
@@ -285,6 +285,11 @@ ble_hci_trans_ll_evt_tx(uint8_t *hci_ev)
|
||||
|
||||
assert(hci_ev != NULL);
|
||||
|
||||
if (!tud_ready()) {
|
||||
ble_hci_trans_buf_free(hci_ev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
pkt = os_memblock_get(&ble_hci_pkt_pool);
|
||||
if (pkt == NULL) {
|
||||
ble_hci_trans_buf_free(hci_ev);
|
||||
|
||||
Reference in New Issue
Block a user