hciattach: set flag to enable HCI reset on init
On some qca devices, correct setup of BT+WLAN co-existance requires
HCI reset being set at the start of power on sequence. Sending HCI
resets has no side effect.
Upstream-Status: Inappropriate [enable feature]
Change-Id: I71cb367d10d4d19d82b41af6a4a0b8b2f770f691
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 200f734..d03ed46 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1158,6 +1158,9 @@
if (u->flags & AMP_DEV)
flags |= 1 << HCI_UART_CREATE_AMP;
+ if (!strncmp(u->type, "qca", 3))
+ flags |= 1 << HCI_UART_RESET_ON_INIT;
+
fd = open(dev, O_RDWR | O_NOCTTY);
if (fd < 0) {
perror("Can't open serial port");