From 2c33d253f500ce604315e6f8ffbc7b2efcc3d20f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 29 Oct 2012 15:48:52 -0700 Subject: [PATCH] hciattach: Allow creating AMP controller over UART --- tools/hciattach.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/hciattach.c b/tools/hciattach.c index d19fa33fc..09aed24d1 100644 --- a/tools/hciattach.c +++ b/tools/hciattach.c @@ -68,6 +68,7 @@ struct uart_t { }; #define FLOW_CTL 0x0001 +#define AMP_DEV 0x0002 #define ENABLE_PM 1 #define DISABLE_PM 0 @@ -1154,6 +1155,10 @@ struct uart_t uart[] = { { "3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 115200, 0, DISABLE_PM, NULL, NULL, NULL }, + /* AMP controller UART */ + { "amp", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, + AMP_DEV, DISABLE_PM, NULL, NULL, NULL }, + { NULL, 0 } }; @@ -1187,6 +1192,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) if (raw) flags |= 1 << HCI_UART_RAW_DEVICE; + if (u->flags & AMP_DEV) + flags |= 1 << HCI_UART_CREATE_AMP; + fd = open(dev, O_RDWR | O_NOCTTY); if (fd < 0) { perror("Can't open serial port"); -- 2.47.3