Skip to contentSkip to conversation

Bluetooth: Add support for creating HCI UART based AMP controllers

PATCH Applied Marcel Holtmann 2 participants 2 messages Feb 24, 2012 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Add support for creating HCI UART based AMP controllers

In reality this might never be used for real hardware, but it is a nice feature for emulating AMP controllers within a virtual machine.

---
 drivers/bluetooth/hci_ldisc.c |    5 +++++
 drivers/bluetooth/hci_uart.h  |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/bluetooth/hci_ldisc.c +5 -0
index cdc3594..fd5adb4 100644
@@ -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);
drivers/bluetooth/hci_uart.h +1 -0
index 54c8983..6cf6ab22 100644
@@ -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;
 
Signature · 1 line
1.7.7.6
#1 lore raw

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

In reality this might never be used for real hardware, but it is a nice feature for emulating AMP controllers within a virtual machine.

---
 drivers/bluetooth/hci_ldisc.c |    5 +++++
 drivers/bluetooth/hci_uart.h  |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

Applied. Thanks.

Johan