* be continuously allocated. We do it though, to preserve similar
* behaviour between hosts. Some things, like the BD_ADDR cannot be
* preserved though (for example if a real hci is used). */
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
# define HNDL(raw) bswap16(raw)
#else
# define HNDL(raw) (raw)
static void bt_hci_mod_timer_1280ms(QEMUTimer *timer, int period)
{
qemu_mod_timer(timer, qemu_get_clock(vm_clock) +
- muldiv64(period << 7, ticks_per_sec, 100));
+ muldiv64(period << 7, get_ticks_per_sec(), 100));
}
static void bt_hci_inquiry_start(struct bt_hci_s *hci, int length)
static int bt_hci_version_req(struct bt_hci_s *hci, uint16_t handle)
{
- struct bt_device_s *slave;
evt_read_remote_version_complete params;
if (bt_hci_handle_bad(hci, handle))
return -ENODEV;
- slave = bt_hci_remote_dev(hci, handle);
+ bt_hci_remote_dev(hci, handle);
bt_hci_event_status(hci, HCI_SUCCESS);
bt_hci_event_status(hci, HCI_SUCCESS);
qemu_mod_timer(link->acl_mode_timer, qemu_get_clock(vm_clock) +
- muldiv64(interval * 625, ticks_per_sec, 1000000));
+ muldiv64(interval * 625, get_ticks_per_sec(), 1000000));
bt_hci_lmp_mode_change_master(hci, link->link, mode, interval);
return 0;
const uint8_t *data, int length)
{
struct bt_hci_s *hci = hci_from_info(info);
- struct bt_link_s *link;
uint16_t handle;
int datalen;
handle = acl_handle((data[1] << 8) | data[0]);
datalen = data[2];
- data += 3;
length -= 3;
if (bt_hci_handle_bad(hci, handle)) {
__FUNCTION__, handle);
return;
}
- handle &= ~HCI_HANDLE_OFFSET;
if (datalen > length) {
fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",
return;
}
- link = hci->lm.handle[handle].link;
/* TODO */
/* TODO: increase counter and send EVT_NUM_COMP_PKTS if synchronous