Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <frederic.danis@collabora.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Frédéric Danis and committed by
Luiz Augusto von Dentz
0519376d fe4408da

+3
+3
drivers/bluetooth/hci_ldisc.c
··· 507 507 hu->alignment = 1; 508 508 hu->padding = 0; 509 509 510 + /* Use serial port speed as oper_speed */ 511 + hu->oper_speed = tty->termios.c_ospeed; 512 + 510 513 INIT_WORK(&hu->init_ready, hci_uart_init_work); 511 514 INIT_WORK(&hu->write_work, hci_uart_write_work); 512 515