Skip to contentSkip to conversation

[5345] Add a virtual HCI.

Qemu-devel Andrzej Zaborowski 2 participants 3 messages Sep 29, 2008 – Sep 30, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 5345

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5345
Author:   balrog
Date:     2008-09-29 00:02:34 +0000 (Mon, 29 Sep 2008)

Log Message:
-----------
Add a virtual HCI.

This implements most of the logic of a real HCI (at least the pieces marked as mandatory). It doesn't support keys, authentication etc. It works on top of the LMP layer, which is not fully emulated because software never has direct access to it.

Modified Paths:
--------------
trunk/Makefile
trunk/hw/bt.h

Added Paths:
-----------
trunk/hw/bt-hci.c

Modified: trunk/Makefile
===================================================================

Makefile +1 -1
@@ -81,7 +81,7 @@
 OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
 OBJS+=sd.o ssi-sd.o
-OBJS+=bt.o bt-host.o
+OBJS+=bt.o bt-host.o bt-hci.o
 
 ifdef CONFIG_BRLAPI
 OBJS+= baum.o

Added: trunk/hw/bt-hci.c
===================================================================

hw/bt-hci.c +2220 -0

2,220 lines not on this page · raw message

Modified: trunk/hw/bt.h
===================================================================

hw/bt.h +11 -0
@@ -4,6 +4,11 @@
  * Copyright (C) 2007 OpenMoko, Inc.
  * Written by Andrzej Zaborowski <[email protected]>
  *
+ * Useful definitions taken from BlueZ project's headers.
+ * Copyright (C) 2000-2001  Qualcomm Incorporated
+ * Copyright (C) 2002-2003  Maxim Krasnyansky <[email protected]>
+ * Copyright (C) 2002-2006  Marcel Holtmann <[email protected]>
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation; either version 2 of
@@ -104,6 +109,12 @@
 void bt_device_init(struct bt_device_s *dev, struct bt_scatternet_s *net);
 void bt_device_done(struct bt_device_s *dev);
 
+/* bt-hci.c */
+struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net);
+
+/* bt-host.c */
+struct HCIInfo *bt_host_hci(const char *id);
+
 /* bt-hci-csr.c */
 enum {
     csrhci_pin_reset,
#1 lore raw
Quoted 8 lines · Andrzej Zaborowski

Revision: 5345

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5345

Author: balrog
Date: 2008-09-29 00:02:34 +0000 (Mon, 29 Sep 2008)

+void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data) +void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *data) +void bt_hci_done(struct HCIInfo *info)

Forgot 'static'?

#2 lore raw

2008/9/29 Blue Swirl <[email protected]>:

Quoted 11 lines · Andrzej Zaborowski
Quoted 8 lines

Revision: 5345

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5345

Author: balrog
Date: 2008-09-29 00:02:34 +0000 (Mon, 29 Sep 2008)

+void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data) +void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *data) +void bt_hci_done(struct HCIInfo *info)

Forgot 'static'?

Now added. I wanted to use bt_hci_done from other places but didn't need to in the end. bt_submit_raw_acl should not be static but I should probably remove all lmp stuff as no code in svn uses it, or move it to bt-lmp.c.

Thanks