From patchwork Wed Oct 24 12:58:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 193786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B8B912C008B for ; Thu, 25 Oct 2012 00:50:17 +1100 (EST) Received: from localhost ([::1]:58042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0aM-0003xu-Ra for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 09:01:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0ZZ-0003B2-CV for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR0ZU-0003J1-4t for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:35 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:46646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0ZS-0003DZ-RB for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:32 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so330905pad.4 for ; Wed, 24 Oct 2012 06:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=rkI2n4YIafyPco9gUUr9YZntNjwAn+PngZprCPGOWOA=; b=UKnT5Hi7F4Gsfr7vK3TFJI8yZLkEfe0a7YxkBRjaXZ67yI9Grb8oqDXCfl5mgQcptb otZWoDN9D6E0qFnaY38h2ff0vmhhJr3dwKU2/PhFXOg6Dm6HGUOYei9UN4h5/8+AqVYN 0391Pi4RKDkh16umMm4S4vteX4BeJ4Ph95f9wt47UIyaplPDQMK4klnVE830/Kx1vtBm ol3FDmvUEskltiSo0pXueyzW0aI21a1K12ZMT0TTSffXy+YY6Sh4Cb1QQ61u/sAyzH0Y Yn7JizPqsT42Ucmcr7ZmmdLGEmyAIsyVN702Qd/fBKxxfVkDFLmTQeqJcglSKAk49K6o JGJw== Received: by 10.68.240.36 with SMTP id vx4mr49541107pbc.89.1351083619320; Wed, 24 Oct 2012 06:00:19 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id n7sm9466138pav.26.2012.10.24.06.00.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 06:00:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 24 Oct 2012 14:58:42 +0200 Message-Id: <1351083542-15272-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1351083542-15272-1-git-send-email-pbonzini@redhat.com> References: <1351083542-15272-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Cc: peter.maydell@linaro.org, aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 12/32] net: move Bluetooth stuff out of net.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- bt-host.c | 1 - bt-host.h | 13 ++++++++++++- bt-vhci.c | 2 +- hw/bt-hci-csr.c | 2 +- hw/bt-hci.c | 2 +- hw/bt.c | 2 +- hw/usb/dev-bluetooth.c | 2 +- net.h | 14 -------------- 8 files changed, 17 insertions(+), 21 deletions(-) diff --git a/bt-host.c b/bt-host.c index 3118645..65aaca3 100644 --- a/bt-host.c +++ b/bt-host.c @@ -18,7 +18,6 @@ */ #include "qemu-common.h" -#include "net.h" #include "bt-host.h" #include "main-loop.h" diff --git a/bt-host.h b/bt-host.h index f1eff65..2bc6d53 100644 --- a/bt-host.h +++ b/bt-host.h @@ -1,9 +1,20 @@ #ifndef BT_HOST_H #define BT_HOST_H -struct HCIInfo; +/* BT HCI info */ + +struct HCIInfo { + int (*bdaddr_set)(struct HCIInfo *hci, const uint8_t *bd_addr); + void (*cmd_send)(struct HCIInfo *hci, const uint8_t *data, int len); + void (*sco_send)(struct HCIInfo *hci, const uint8_t *data, int len); + void (*acl_send)(struct HCIInfo *hci, const uint8_t *data, int len); + void *opaque; + void (*evt_recv)(void *opaque, const uint8_t *data, int len); + void (*acl_recv)(void *opaque, const uint8_t *data, int len); +}; /* bt-host.c */ struct HCIInfo *bt_host_hci(const char *id); +struct HCIInfo *qemu_next_hci(void); #endif diff --git a/bt-vhci.c b/bt-vhci.c index 6fecb66..13c0e53 100644 --- a/bt-vhci.c +++ b/bt-vhci.c @@ -18,7 +18,7 @@ */ #include "qemu-common.h" -#include "net.h" +#include "bt-host.h" #include "hw/bt.h" #include "main-loop.h" diff --git a/hw/bt-hci-csr.c b/hw/bt-hci-csr.c index 772b677..0faabbb 100644 --- a/hw/bt-hci-csr.c +++ b/hw/bt-hci-csr.c @@ -22,7 +22,7 @@ #include "qemu-char.h" #include "qemu-timer.h" #include "irq.h" -#include "net.h" +#include "bt-host.h" #include "bt.h" struct csrhci_s { diff --git a/hw/bt-hci.c b/hw/bt-hci.c index e54cfd7..d2ad57f 100644 --- a/hw/bt-hci.c +++ b/hw/bt-hci.c @@ -21,7 +21,7 @@ #include "qemu-common.h" #include "qemu-timer.h" #include "usb.h" -#include "net.h" +#include "bt-host.h" #include "bt.h" struct bt_hci_s { diff --git a/hw/bt.c b/hw/bt.c index dc99fc2..3fea098 100644 --- a/hw/bt.c +++ b/hw/bt.c @@ -18,7 +18,7 @@ */ #include "qemu-common.h" -#include "net.h" +#include "bt-host.h" #include "bt.h" /* Slave implementations can ignore this */ diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index 55bc191..3b64587 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluetooth.c @@ -21,7 +21,7 @@ #include "qemu-common.h" #include "hw/usb.h" #include "hw/usb/desc.h" -#include "net.h" +#include "bt-host.h" #include "hw/bt.h" struct USBBtState { diff --git a/net.h b/net.h index 04fda1d..1d0816b 100644 --- a/net.h +++ b/net.h @@ -133,20 +133,6 @@ extern int nb_nics; extern NICInfo nd_table[MAX_NICS]; extern int default_net; -/* BT HCI info */ - -struct HCIInfo { - int (*bdaddr_set)(struct HCIInfo *hci, const uint8_t *bd_addr); - void (*cmd_send)(struct HCIInfo *hci, const uint8_t *data, int len); - void (*sco_send)(struct HCIInfo *hci, const uint8_t *data, int len); - void (*acl_send)(struct HCIInfo *hci, const uint8_t *data, int len); - void *opaque; - void (*evt_recv)(void *opaque, const uint8_t *data, int len); - void (*acl_recv)(void *opaque, const uint8_t *data, int len); -}; - -struct HCIInfo *qemu_next_hci(void); - /* from net.c */ extern const char *legacy_tftp_prefix; extern const char *legacy_bootp_filename;