bluetooth: h5: sending priority events through bt_recv_pri

By default all events are processed through bt_recv, which results
in lost events and subsys/bluetooth/hci_core.c:hci_event function
assertions fail to pass

Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
This commit is contained in:
ZhongYao Luo 2019-12-03 17:45:47 +08:00 committed by Johan Hedberg
commit 6412c070eb

View file

@ -397,6 +397,12 @@ static void h5_process_complete_packet(u8_t *hdr)
net_buf_put(&h5.rx_queue, buf);
break;
case HCI_EVENT_PKT:
if (buf->len > sizeof(struct bt_hci_evt_hdr) &&
bt_hci_evt_is_prio(((struct bt_hci_evt_hdr *)buf->data)->evt)) {
hexdump("=> ", buf->data, buf->len);
bt_recv_prio(buf);
break;
}
case HCI_ACLDATA_PKT:
hexdump("=> ", buf->data, buf->len);
bt_recv(buf);