Skip to content

Commit 0519376

Browse files
fdanis-ossVudentz
authored andcommitted
Bluetooth: hci_ldisc: Use speed set by btattach as oper_speed
Starting a BCM UART controller not defined as a platform device or a serdev with "btattach -B /dev/ttyS1 -P bcm -S 3000000" works fine but the serial port remains at the init_speed, i.e. 115200. The oper_speed is only set if a device is declared in ACPI, device tree or as a platform device. This commit copies the serial port speed fixed by hciattach to the oper_speed on line discipline opening. Signed-off-by: Frédéric Danis <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent fe4408d commit 0519376

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/bluetooth/hci_ldisc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ static int hci_uart_tty_open(struct tty_struct *tty)
507507
hu->alignment = 1;
508508
hu->padding = 0;
509509

510+
/* Use serial port speed as oper_speed */
511+
hu->oper_speed = tty->termios.c_ospeed;
512+
510513
INIT_WORK(&hu->init_ready, hci_uart_init_work);
511514
INIT_WORK(&hu->write_work, hci_uart_write_work);
512515

0 commit comments

Comments
 (0)