summaryrefslogtreecommitdiff
path: root/tools/hciattach.c
diff options
context:
space:
mode:
authorWu zheng <wu.zheng@intel.com>2013-10-23 10:59:15 +0800
committerWu zheng <wu.zheng@intel.com>2013-10-23 10:59:15 +0800
commit7b2a18f8fa9ca2a101244853e34bd44f9ce3b0a3 (patch)
tree38610dbb3a2920b9f57fc7638e0efed820a3acb9 /tools/hciattach.c
parent71235d13fb107f879369e64385d8c97de0bb840e (diff)
downloadbluez-7b2a18f8fa9ca2a101244853e34bd44f9ce3b0a3.tar.gz
bluez-7b2a18f8fa9ca2a101244853e34bd44f9ce3b0a3.tar.bz2
bluez-7b2a18f8fa9ca2a101244853e34bd44f9ce3b0a3.zip
Imported Upstream version 5.10upstream/5.10
Diffstat (limited to 'tools/hciattach.c')
-rw-r--r--tools/hciattach.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/hciattach.c b/tools/hciattach.c
index d19fa33f..db01b85b 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -27,7 +27,6 @@
#include <config.h>
#endif
-#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
@@ -49,10 +48,6 @@
#include "hciattach.h"
-#ifdef NEED_PPOLL
-#include "ppoll.h"
-#endif
-
struct uart_t {
char *type;
int m_id;
@@ -68,6 +63,7 @@ struct uart_t {
};
#define FLOW_CTL 0x0001
+#define AMP_DEV 0x0002
#define ENABLE_PM 1
#define DISABLE_PM 0
@@ -1154,6 +1150,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 +1187,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");