bluetooth/hci: x86_64 build fixes

This commit is contained in:
Alexander von Gluck IV 2016-04-09 21:19:16 -05:00
parent 73e3d8d20c
commit 13afb4fb37
1 changed files with 19 additions and 12 deletions

View File

@ -197,9 +197,11 @@ Assemble(bluetooth_device* bluetoothDevice, bt_packet_t type, void* data,
bluetoothDevice->fExpectedPacketSize[type] = 0; bluetoothDevice->fExpectedPacketSize[type] = 0;
} else { } else {
#if DEBUG_ACL #if DEBUG_ACL
if (type == BT_ACL) if (type == BT_ACL) {
debugf("ACL Packet not filled size=%ld expected=%ld\n", debugf("ACL Packet not filled size=%" B_PRIuSIZE
nbuf->size, bluetoothDevice->fExpectedPacketSize[type]); " expected=%" B_PRIuSIZE "\n", nbuf->size,
bluetoothDevice->fExpectedPacketSize[type]);
}
#endif #endif
} }
@ -220,13 +222,14 @@ HciPacketHandler(void* data, int32 code, size_t size)
bluetooth_device* bluetoothDevice = FindDeviceByID(deviceId); bluetooth_device* bluetoothDevice = FindDeviceByID(deviceId);
debugf("to assemble %ld bytes of %ld\n", size, deviceId); debugf("to assemble %" B_PRIuSIZE " bytes of 0x%" B_PRIx32 "\n", size,
deviceId);
if (bluetoothDevice != NULL) if (bluetoothDevice != NULL)
return Assemble(bluetoothDevice, Bluetooth::CodeHandler::Protocol(code), return Assemble(bluetoothDevice, Bluetooth::CodeHandler::Protocol(code),
data, size); data, size);
else { else {
debugf("Device %ld could not be matched\n", deviceId); debugf("Device 0x%" B_PRIx32 " could not be matched\n", deviceId);
} }
return B_ERROR; return B_ERROR;
@ -266,7 +269,7 @@ RegisterDriver(bt_hci_transport_hooks* hooks, bluetooth_device** _device)
sDeviceList.Add(device); sDeviceList.Add(device);
debugf("Device %lx\n", device->index ); debugf("Device %" B_PRIx32 "\n", device->index);
*_device = device; *_device = device;
@ -309,12 +312,13 @@ PostACL(hci_id hciId, net_buffer* buffer)
bluetooth_device* device = FindDeviceByID(hciId); bluetooth_device* device = FindDeviceByID(hciId);
if (device == NULL) { if (device == NULL) {
debugf("No device %lx", hciId); debugf("No device 0x%" B_PRIx32 "\n", hciId);
return B_ERROR; return B_ERROR;
} }
debugf("index %lx try to send bt packet of %lu bytes (flags %ld):\n", debugf("index 0x%" B_PRIx32 " try to send bt packet of %" B_PRIu32
device->index, buffer->size, buffer->flags); " bytes (flags 0x%" B_PRIx32 "):\n", device->index, buffer->size,
buffer->flags);
// TODO: ATOMIC! any other thread should stop here // TODO: ATOMIC! any other thread should stop here
do { do {
@ -378,7 +382,8 @@ dump_bluetooth_devices(int argc, char** argv)
while (iterator.HasNext()) { while (iterator.HasNext()) {
device = iterator.Next(); device = iterator.Next();
kprintf("\tindex=%#lx @%p hooks=%p\n",device->index, device, device->hooks); kprintf("\tindex=%" B_PRIx32 " @%p hooks=%p\n", device->index,
device, device->hooks);
} }
return 0; return 0;
@ -396,7 +401,9 @@ bluetooth_std_ops(int32 op, ...)
{ {
status_t status; status_t status;
status = get_module(NET_BUFFER_MODULE_NAME, (module_info**)&gBufferModule); status = get_module(NET_BUFFER_MODULE_NAME,
(module_info**)&gBufferModule);
if (status < B_OK) { if (status < B_OK) {
panic("no way Dude we need that!"); panic("no way Dude we need that!");
return status; return status;
@ -431,7 +438,7 @@ bluetooth_std_ops(int32 op, ...)
mutex_init(&sListLock, "bluetooth devices"); mutex_init(&sListLock, "bluetooth devices");
// status = InitializeAclConnectionThread(); // status = InitializeAclConnectionThread();
debugf("Connection Thread error=%lx\n", status); debugf("%s: Connection Thread error\n", __func__);
add_debugger_command("btLocalDevices", &dump_bluetooth_devices, add_debugger_command("btLocalDevices", &dump_bluetooth_devices,
"Lists Bluetooth LocalDevices registered in the Stack"); "Lists Bluetooth LocalDevices registered in the Stack");