Diff between 2d79e65df552668264a754dfacf59e7db4be3b09 and 27fe5e2ee70e80be14e24935a3f1133794096125

Changed Files

File Additions Deletions Status
tools/btproxy.c +9 -2 modified

Full Patch

diff --git a/tools/btproxy.c b/tools/btproxy.c
index 6c8f29b..47cffa9 100644
--- a/tools/btproxy.c
+++ b/tools/btproxy.c
@@ -47,6 +47,9 @@
 #include "src/shared/mainloop.h"
 #include "monitor/bt.h"
 
+#define HCI_BREDR	0x00
+#define HCI_AMP		0x01
+
 #define BTPROTO_HCI	1
 struct sockaddr_hci {
 	sa_family_t	hci_family;
@@ -585,18 +588,22 @@ int main(int argc, char *argv[])
 	const char *server_address = NULL;
 	const char *unix_path = NULL;
 	unsigned short tcp_port = 0xb1ee;	/* 45550 */
+	uint8_t type = HCI_BREDR;
 	const char *str;
 	sigset_t mask;
 
 	for (;;) {
 		int opt;
 
-		opt = getopt_long(argc, argv, "c:l::u::p:i:dvh",
+		opt = getopt_long(argc, argv, "ac:l::u::p:i:dvh",
 						main_options, NULL);
 		if (opt < 0)
 			break;
 
 		switch (opt) {
+		case 'a':
+			type = HCI_AMP;
+			break;
 		case 'c':
 			connect_address = optarg;
 			break;
@@ -674,7 +681,7 @@ int main(int argc, char *argv[])
 
 		printf("Opening virtual device\n");
 
-		host_fd = open_vhci(0x00);
+		host_fd = open_vhci(type);
 		if (host_fd < 0) {
 			close(dev_fd);
 			return EXIT_FAILURE;