From patchwork Thu Dec 6 13:06:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 204267 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 B6E852C00A5 for ; Fri, 7 Dec 2012 02:01:25 +1100 (EST) Received: from localhost ([::1]:46413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgbCF-0005IN-9P for incoming@patchwork.ozlabs.org; Thu, 06 Dec 2012 08:08:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgbBS-0003qE-Pc for qemu-devel@nongnu.org; Thu, 06 Dec 2012 08:08:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgbBM-00053i-AF for qemu-devel@nongnu.org; Thu, 06 Dec 2012 08:08:10 -0500 Received: from mail-ia0-f182.google.com ([209.85.210.182]:35502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgbBM-00053X-4a for qemu-devel@nongnu.org; Thu, 06 Dec 2012 08:08:04 -0500 Received: by mail-ia0-f182.google.com with SMTP id x2so5737461iad.13 for ; Thu, 06 Dec 2012 05:08:02 -0800 (PST) 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=Fz1mwYPCt1tAuasVI0DnBK9YeRUdr0Am3sx8iOAR2BI=; b=aMfay0LGl/pXI/rRuVFuLMQdAAoSeqDiT9ye/HDUhRUSZiTcZqMarYwiDElKqux8wU EdX+/Yt1L3z+wa4o4cbTtdIYaL7tFk9k6FgscAreWIYwr7K4OBfo+Pu6qyIh5iDSLt/x QtJT4UKtbpJ/anZIJExBK0Pw26pNrki1baJF93idCZ47I+tKizTD7vh5ewGk+z6/MbqA Va/EVAvc80dvjj4IFOZsVVwedpMciycoTR+sT+g6CpndI8VR7gTTCujS983cbcv+6ob3 OfmR4Rbw9S3801Pdh40qW74Yu+rOBo+ue3Hg7//jC075ZgdP4FdKmIGjQdoemIpZ5i2O OTgg== Received: by 10.50.194.132 with SMTP id hw4mr1285964igc.37.1354799282829; Thu, 06 Dec 2012 05:08:02 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-219-150.ip51.fastwebnet.it. [93.34.219.150]) by mx.google.com with ESMTPS id wm10sm15431723igc.2.2012.12.06.05.07.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 05:08:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 6 Dec 2012 14:06:49 +0100 Message-Id: <1354799230-30904-12-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1354799230-30904-1-git-send-email-pbonzini@redhat.com> References: <1354799230-30904-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.182 Cc: aliguori@us.ibm.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH 11/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 39984f5..4a37442 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;