27 lines
666 B
Diff
27 lines
666 B
Diff
From 337b84e01da6ffb8c2b175ac88b83c34b17569a3 Mon Sep 17 00:00:00 2001
|
|
From: liyue <liyue@forlinx.com>
|
|
Date: Mon, 11 Sep 2023 17:26:57 +0800
|
|
Subject: [PATCH 2/2] hciattach fix
|
|
|
|
---
|
|
tools/hciattach.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/tools/hciattach.c b/tools/hciattach.c
|
|
index 276a4e5..20833ad 100644
|
|
--- a/tools/hciattach.c
|
|
+++ b/tools/hciattach.c
|
|
@@ -1177,6 +1177,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
|
|
|
|
tcflush(fd, TCIOFLUSH);
|
|
|
|
+ if (u->speed == 0)
|
|
+ u->speed = u->init_speed;
|
|
+
|
|
/* Set actual baudrate */
|
|
if (set_speed(fd, &ti, u->speed) < 0) {
|
|
perror("Can't set baud rate");
|
|
--
|
|
2.25.1
|
|
|