* [PATCH] Bluetooth: Add support for creating HCI UART based AMP controllers
@ 2012-02-24 16:09 Marcel Holtmann
2012-02-24 20:13 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2012-02-24 16:09 UTC (permalink / raw)
To: linux-bluetooth
In reality this might never be used for real hardware, but it is a nice
feature for emulating AMP controllers within a virtual machine.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
drivers/bluetooth/hci_ldisc.c | 5 +++++
drivers/bluetooth/hci_uart.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index cdc3594..fd5adb4 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -396,6 +396,11 @@ static int hci_uart_register_dev(struct hci_uart *hu)
if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+ if (test_bit(HCI_UART_CREATE_AMP, &hu->hdev_flags))
+ hdev->dev_type = HCI_AMP;
+ else
+ hdev->dev_type = HCI_BREDR;
+
if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
hci_free_dev(hdev);
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 54c8983..6cf6ab22 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -46,6 +46,7 @@
#define HCI_UART_RAW_DEVICE 0
#define HCI_UART_RESET_ON_INIT 1
+#define HCI_UART_CREATE_AMP 2
struct hci_uart;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Add support for creating HCI UART based AMP controllers
2012-02-24 16:09 [PATCH] Bluetooth: Add support for creating HCI UART based AMP controllers Marcel Holtmann
@ 2012-02-24 20:13 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-02-24 20:13 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Fri, Feb 24, 2012, Marcel Holtmann wrote:
> In reality this might never be used for real hardware, but it is a nice
> feature for emulating AMP controllers within a virtual machine.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> drivers/bluetooth/hci_ldisc.c | 5 +++++
> drivers/bluetooth/hci_uart.h | 1 +
> 2 files changed, 6 insertions(+), 0 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-24 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 16:09 [PATCH] Bluetooth: Add support for creating HCI UART based AMP controllers Marcel Holtmann
2012-02-24 20:13 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox