hci: reset num_cmd_packets on vendor specific event for CSR controllers

This commit is contained in:
Matthias Ringwald 2018-02-20 09:28:06 +01:00
parent 4a34092706
commit 0b36101d42

View File

@ -2294,6 +2294,17 @@ static void event_handler(uint8_t *packet, int size){
}
break;
#endif
case HCI_EVENT_VENDOR_SPECIFIC:
// Vendor specific commands often create vendor specific event instead of num completed packets
// To avoid getting stuck as num_cmds_packets is zero, reset it to 1 for controllers with this behaviour
switch (hci_stack->manufacturer){
case BLUETOOTH_COMPANY_ID_CAMBRIDGE_SILICON_RADIO:
hci_stack->num_cmd_packets = 1;
break;
default:
break;
}
break;
default:
break;
}