[PATCH BlueZ 2/3] shared: Remove static address assignment in hciemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we need multiple virtual devices, addresses should not be the same.
Inside the function btdev_create, a specific address is generated.
---
 src/shared/hciemu.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/shared/hciemu.c b/src/shared/hciemu.c
index 60a4f47..8cd6548 100644
--- a/src/shared/hciemu.c
+++ b/src/shared/hciemu.c
@@ -192,20 +192,12 @@ static guint create_source_btdev(int fd, struct btdev *btdev)
 static bool create_vhci(struct hciemu *hciemu)
 {
 	struct btdev *btdev;
-	uint8_t bdaddr[6];
-	const char *str;
-	int fd, i;
+	int fd;
 
 	btdev = btdev_create(hciemu->btdev_type, 0x00);
 	if (!btdev)
 		return false;
 
-	str = hciemu_get_address(hciemu);
-
-	for (i = 5; i >= 0; i--, str += 3)
-		bdaddr[i] = strtol(str, NULL, 16);
-
-	btdev_set_bdaddr(btdev, bdaddr);
 	btdev_set_command_handler(btdev, master_command_callback, hciemu);
 
 	fd = open("/dev/vhci", O_RDWR | O_NONBLOCK | O_CLOEXEC);
-- 
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux