xref: /OK3568_Linux_fs/buildroot/package/bluez5_utils/0004-OK3568-hciattach-fix.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 337b84e01da6ffb8c2b175ac88b83c34b17569a3 Mon Sep 17 00:00:00 2001
2From: liyue <liyue@forlinx.com>
3Date: Mon, 11 Sep 2023 17:26:57 +0800
4Subject: [PATCH 2/2] hciattach fix
5
6---
7 tools/hciattach.c | 3 +++
8 1 file changed, 3 insertions(+)
9
10diff --git a/tools/hciattach.c b/tools/hciattach.c
11index 276a4e5..20833ad 100644
12--- a/tools/hciattach.c
13+++ b/tools/hciattach.c
14@@ -1177,6 +1177,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
15
16 	tcflush(fd, TCIOFLUSH);
17
18+	if (u->speed == 0)
19+		u->speed = u->init_speed;
20+
21 	/* Set actual baudrate */
22 	if (set_speed(fd, &ti, u->speed) < 0) {
23 		perror("Can't set baud rate");
24--
252.25.1
26
27