Hi Ilya, > Bring the tty into a known 8 bits, 1 start bit, 1 stop bit, > hardware flow control state with a given baud rate. > > Signed-off-by: Ilya Faenson <ifaenson@xxxxxxxxxxxx> > --- > drivers/bluetooth/hci_ldisc.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c > index ac87346..606cc5a 100644 > --- a/drivers/bluetooth/hci_ldisc.c > +++ b/drivers/bluetooth/hci_ldisc.c > @@ -271,9 +271,16 @@ void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed) > struct tty_struct *tty = hu->tty; > struct ktermios ktermios; > > + /* Bring the UART into a known state with a given baud rate */ > ktermios = tty->termios; > ktermios.c_cflag &= ~CBAUD; > - ktermios.c_cflag |= BOTHER; > + ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | > + IGNCR | ICRNL | IXON); > + ktermios.c_oflag &= ~OPOST; > + ktermios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); > + ktermios.c_cflag &= ~(CSIZE | PARENB | CBAUD); I just realize that we are clearing CBAUD twice here. I think the one above BOTHER should also be removed. > + ktermios.c_cflag |= CS8; > + ktermios.c_cflag |= CRTSCTS; > tty_termios_encode_baud_rate(&ktermios, speed, speed); Regards Marcel -- 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