mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 06:39:53 +00:00
reset tx state before daemon event hci packet sent - avoids stalls
This commit is contained in:
parent
1fd51e4555
commit
5ffcfcf3c5
@ -360,6 +360,12 @@ static void h4_block_sent(void){
|
||||
|
||||
static int h4_process(struct data_source *ds) {
|
||||
|
||||
// reset tx state before emitting packet sent event
|
||||
// to allow for positive can_send_now
|
||||
if (tx_state == TX_DONE){
|
||||
tx_state = TX_IDLE;
|
||||
}
|
||||
|
||||
// notify about packet sent
|
||||
if (tx_send_packet_sent){
|
||||
tx_send_packet_sent = 0;
|
||||
@ -367,11 +373,6 @@ static int h4_process(struct data_source *ds) {
|
||||
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
|
||||
}
|
||||
|
||||
// reset tx state
|
||||
if (tx_state == TX_DONE){
|
||||
tx_state = TX_IDLE;
|
||||
}
|
||||
|
||||
if (h4_state != H4_PACKET_RECEIVED) return 0;
|
||||
|
||||
packet_handler(hci_packet[0], &hci_packet[1], read_pos-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user