Lines Matching refs:hci
2 * Wrap a host Bluetooth HCI socket in a struct HCIInfo.
31 # include <bluetooth/hci.h>
39 struct HCIInfo hci;
46 static void bt_host_send(struct HCIInfo *hci,
49 struct bt_host_hci_s *s = (struct bt_host_hci_s *) hci;
67 static void bt_host_cmd(struct HCIInfo *hci, const uint8_t *data, int len)
69 bt_host_send(hci, HCI_COMMAND_PKT, data, len);
72 static void bt_host_acl(struct HCIInfo *hci, const uint8_t *data, int len)
74 bt_host_send(hci, HCI_ACLDATA_PKT, data, len);
77 static void bt_host_sco(struct HCIInfo *hci, const uint8_t *data, int len)
79 bt_host_send(hci, HCI_SCODATA_PKT, data, len);
94 fprintf(stderr, "qemu: error %i reading HCI frame\n", errno);
106 s->hci.evt_recv(s->hci.opaque, pkt, pktlen);
121 s->hci.acl_recv(s->hci.opaque, pkt, pktlen);
136 fprintf(stderr, "qemu: bad HCI packet type %02x\n", pkt[-1]);
140 static int bt_host_bdaddr_set(struct HCIInfo *hci, const uint8_t *bd_addr)
175 fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno);
182 s->hci.cmd_send = bt_host_cmd;
183 s->hci.sco_send = bt_host_sco;
184 s->hci.acl_send = bt_host_acl;
185 s->hci.bdaddr_set = bt_host_bdaddr_set;
189 return &s->hci;