Skip to content

Commit 6412c07

Browse files
LuoZhongYaojhedberg
authored andcommitted
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 <[email protected]>
1 parent 994246f commit 6412c07

File tree

1 file changed

+6
-0
lines changed
  • drivers/bluetooth/hci

1 file changed

+6
-0
lines changed

drivers/bluetooth/hci/h5.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,12 @@ static void h5_process_complete_packet(u8_t *hdr)
397397
net_buf_put(&h5.rx_queue, buf);
398398
break;
399399
case HCI_EVENT_PKT:
400+
if (buf->len > sizeof(struct bt_hci_evt_hdr) &&
401+
bt_hci_evt_is_prio(((struct bt_hci_evt_hdr *)buf->data)->evt)) {
402+
hexdump("=> ", buf->data, buf->len);
403+
bt_recv_prio(buf);
404+
break;
405+
}
400406
case HCI_ACLDATA_PKT:
401407
hexdump("=> ", buf->data, buf->len);
402408
bt_recv(buf);

0 commit comments

Comments
 (0)